TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Coder on February 03, 2017, 04:55:28 AM
-
Hello guys,
I am trying to create a new empty drawing to use Dbx-Object after that to export specific objects to it but I failed.
I tried getfiled function without any luck though I don't know if this is a good way to create new drawing.
Can anyone help me please?
(setq dwgFile (getfiled "name of drawing" "" "dwg" 1))
Thanks in advance.
-
Note that getfiled will merely return a string (or nil), it will not create anything or perform any operation on a selected file.
To create a new drawing using ObjectDBX, I would suggest creating an ObjectDBX Document object and then invoking the ActiveX saveas method supplied with the filename returned by getfiled (with suitable allowances for if the file already exists).
-
Hi Lee,
That works great, thank you so much. :wink:
I am running a DBX-Object on 3 drawings. Should I create a new DBX-Object every time i run my codes on a drawing file? or just one DBX is enough?.
-
Yay, that works. Thanks Lee.