Replies: 1 comment 2 replies
-
Hi, Since ZwCAD allows this, you could do something like from pyrx import Db, Ge, command
def create_line(db: Db.Database):
line = Db.Line(Ge.Point3d(0, 0, 0), Ge.Point3d(100, 100, 0))
line_id = db.addObject(line)
return line_id
@command
def doit():
db = Db.curDb()
line = Db.Line(create_line(db))
line.upgradeOpen()
line.setColorIndex(1)
line.setOwnerId(db.modelSpaceId()) #<----
line.downgradeOpen() It would not be compatible though |
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.
-
Steps:
DOIT
commandI know this is weird code. The goal is to add a BlockReference this way, but I didn't want to make the sample difficult.
Beta Was this translation helpful? Give feedback.
All reactions