I need to twick my lisp routine (attached) to run it without asking.
This lisp asks if I want to "Update" or/and "Import," while I have a source dwg.
and I want to: (Update and Import).
... so how to remvoe asking and just run the command?
I need that routine to assing to a button in OpenDCL project (I think I know how to do that thogh),
so please Help guys and Thank you in advance,
Alex B.
Alex,
when you need some help in a lisp code, try at the Visual LISP AutoLISP and General Customization Forum, is the correct place to get this kind of help...
Meanwhile, try the attached code, a quick one, not tested (you didn't attached the "ImportLayers" function)...
hope that helps
Henrique
Henrique,
Thanks a lot, but I am a litle confused though.
When you said I did not attach the "imprtlayers" function you meant my attached file isn't a function?
btw, your code works perfect, again thanx a lot.
I was wondering for education purposes - what whould I do to make "importlayers.lsp" to do what you added, but whithin its routine?
May be add before (princ) something like (ImportLayers fn T T) to execute "import" and "update?"
I am trying to be more sofisticated in lisp but it's hard to learn from "0" level, you know, while so many things to do.
I appresiate your business.
Alex B
I am attaching the file just in case it did not show in previouse post.
I was wondering that Materials (-Layer, Mat, ...) did not transfer at all...
I will try your advise to go to linked forums you provided, thanks.
Alex wrote:
"Thanks a lot, but I am a litle confused though. When you said I did not attach the "imprtlayers" function you meant my attached file isn't a function?"
The file you attached, is a function, but is a function to use as a command "c:ImportLayers"
(defun c:ImportLayers (/ ans fn update import)
but what I meant was the other function,
(defun ImportLayers (fn update ltypes / dbx1 complete dbxLayers dbxLay Lay val)
because, without the second function, the command "c:ImportLayers", does not work, because the command line function is used to provide options to the function (defun ImportLayers (fn update ltypes...
If you know the file path and you don't need to browse for the dwg, after loading the "ImportLayers" function, you can use something like this
(ImportLayers "D:\\My Documents\\Alex_CAD-Support\\Support-3D\\3D-STANDARD.dwg" T T)
the double T at the end, are for update and import...
Henrique