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:
acDocMgr.MdiActiveDocument.CloseAndSave("C:\Users\Laptop\Documents\test1.dwg")
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:
_Point
1,1,0
filedia
1
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.
Regards,
Davo_007