Replies: 1 comment 2 replies
-
|
seems the document (database) needs to be modified @command(flags=Ap.CmdFlags.SESSION)
def doit2():
axdoc = open_axdoc(dwg_path)
Ed.Core.alert(str(axdoc.isSaved()))
axdoc.modelSpace().addLine(Ge.Point3d(0,0,0),Ge.Point3d(0,100,0))
Ed.Core.alert(str(axdoc.isSaved()))
axdoc.close(True, str(dwg_path.with_stem(dwg_path.stem + "_copy2"))) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Closing the document with
save=Truedoesn't save the changes. The problem also occurs withAp.Document, and I see that the implementation usesAxfor this purpose. A workaround is to first callSave()and thenClose(save=False). The strange thing is that it doesn't work via COM either, in both Zwcad and AutoCAD (I'm probably doing something wrong).Beta Was this translation helpful? Give feedback.
All reactions