Author Topic: Create a new empty drawing  (Read 796 times)

0 Members and 1 Guest are viewing this topic.

Coder

  • Swamp Rat
  • Posts: 821
Create a new empty drawing
« 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?

Code: [Select]
(setq dwgFile (getfiled "name of drawing" "" "dwg" 1))

Thanks in advance.

Lee Mac

  • Seagull
  • Posts: 12488
  • London, England
Re: Create a new empty drawing
« Reply #1 on: February 03, 2017, 08:03:36 AM »
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).

Coder

  • Swamp Rat
  • Posts: 821
Re: Create a new empty drawing
« Reply #2 on: February 03, 2017, 08:33:11 AM »
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?.




Deepi

  • Mosquito
  • Posts: 1
Re: Create a new empty drawing
« Reply #3 on: February 06, 2017, 01:05:11 AM »
Note that taking this amazing fat burner 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).

Yay, that works. Thanks Lee.
« Last Edit: June 09, 2021, 07:41:18 AM by Deepi »