Im quite new to LISP coding, and mostly i create the tools with copy-pasting and trial and error. tho the case below i cannot solve myself.
I want to command TESTLISP to reload a .lin and a .shx file. This is working.
Now i want to do a 'Layer change', where is replace the linetypes of all layers for other specified ones.
When i use the code below, the LISP doesnt run 'LAYERCHANGER'.
When i add 'C:' to make LAYERCHANGER a command for itself, then it WILL work. (Marked in red)
How can i merge the code from the LAYERCHANGER within the code of 'TESTLISP'.
Note: this is a part of a must lager code, but this is the only part thats failing.
I agree that i have to let go of my copy-past method. Tho i think its a good way to learn LISP by reading working code and trying to understand it.
But anyhow. What would be the correct way to let this LISP work?
The reason i want to call this part of code seperately, is because the LAYERCHANGER 'command' is going to be put in a whole list of commands that need to be exectued when i enter the command TESTLISP.
It seems like the piece of code BIGAL posted fixed the problem. :-)
I was also able to remove the 'C:' in both parts, so the command LAYERCHANGER cannot be executed from AutoCAD but only called by the lisp itself.