Posts: 12
Registered: ‎01-02-2010
Message 1 of 3 (291 Views)

Open Drawing...Update Drawing...Close Saving Changes

291 Views, 2 Replies
01-04-2010 02:29 AM

Hello People,

I am attempting to open a drawing, run a script or lisp and then save and close the drawing.

I am using the following to open the drawing:

Dim acDocMgr As DocumentCollection = Application.DocumentManager

acDocMgr.Open("C:\Users\Laptop\Documents\test1.dwg", False)

and the following the save and close the drawing:


Both the opening and closing of the drawing seem to work fine however the save does not work (but does not error with the above function).

i am attempting to run the following after the open:

acDocMgr.MdiActiveDocument.SendStringToExecute("script" & vbCr & "C:\Users\Laptop\Documents\script.scr" & vbCr, True, False, True)

where the script.scr file contains the following:


The point is created however upon save the data is not saved to the file (i even tried putting qsave in the script).

The plan is to run a lisp routine in place of the script (just trying to get the base to work at the moment) which is to update attributes already in the drawings.

From what i've read around the place (google and here) it appears that a transaction maybe required for the data to be commited to the drawing, however my question is, if the script is doing the creation how do i tell the transaction about it, and further more, if a lisp was to do the updating of the attributes, how would the transaction be told about those updates?

Or is there something else i'm missing entirely??

any push in the right direction would be appreciated.



New Member
Posts: 1
Registered: ‎12-28-2009
Message 2 of 3 (291 Views)

Re: Open Drawing...Update Drawing...Close Saving Changes

01-08-2010 06:43 AM in reply to: davo_007
hello davo_007,

[ http://through-the-interface.typepad.com/through_the_interface/2006/08/calling_command.html] will help.
New Member
Posts: 1
Registered: ‎01-11-2014
Message 3 of 3 (110 Views)

Re: Open Drawing...Update Drawing...Close Saving Changes

01-11-2014 05:43 PM in reply to: davo_007

Want to get Changes DRAWCLOSE TO JEHOVAH How do I do this?


Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.