Replies: 3 comments
-
# pywin32
>>> acad.activeDocument == acad.activeDocument
True |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
i added the #cmp by Ap.Document__eq__
@command
def doit1():
for doc in Ap.Application():
print(doc == Ap.curDoc())
#cmp by Ax.AcadDocument.__eq__
@command
def doit2():
axApp = Ap.Application.acadApplication()
for doc in axApp.documents():
print(doc == axApp.activeDocument())
#cmp by Ax.AcadDocument.__eq__
def doit3():
print(Ax.AcadApplication().activeDocument() == Ax.AcadApplication().activeDocument())
#cmp by HWND
@command
def doit4():
axApp = Ap.Application.acadApplication()
for doc in axApp.documents():
print(doc.HWND() == axApp.activeDocument().HWND())
#cmp native to ax
@command
def doit5():
axApp = Ap.Application.acadApplication()
for doc in Ap.Application():
print(doc.acadDocument() == axApp.activeDocument())
#cmp native to ax by HWND
@command
def doit6():
axApp = Ap.Application.acadApplication()
for doc in Ap.Application():
print(doc.acadDocument().HWND() == axApp.activeDocument().HWND()) |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
it is in ZwCAD, I added def appContextOpenDocument(self, dwgName: str, readOnly: bool = False, /) -> None:but it;s not implemented in Zw or Gstar _path = "M:\\Dev\\Projects\\PyRxGit\\tests\\media\\06457.dwg"
dman = Ap.DocManager()
dman.appContextOpenDocument(_path, True) |
Beta Was this translation helpful? Give feedback.
0 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.
-
I can compare
fullName, but it's not optimal. Is there another way?Side question: Is Ax the only way to open a document read-only?
Beta Was this translation helpful? Give feedback.
All reactions