-
What is the difference between |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
curDb curDb is the database from the current document workingDb is short for AcDbHostApplicationServices::workingDatabase setWorkingDb is short for usually curDb and workingDb are the same, but there may be times where you would set the working database to a side database. Lines 56 to 71 in cbcdbf2 |
Beta Was this translation helpful? Give feedback.
-
There's also a class AutoWorkingDatabase def workOnSideDatabase(db : Db.Database):
autoDb = Db.AutoWorkingDatabase(db)
# do work in side database
# old Db is restored
@command
def doit1():
sidedb = Db.Database(False,True)
sidedb.readDwgFile(...)
workOnSideDatabase(sidedb) |
Beta Was this translation helpful? Give feedback.
curDb
workingDb
setWorkingDb
curDb is the database from the current document
workingDb is short for AcDbHostApplicationServices::workingDatabase
https://help.autodesk.com/view/OARX/2025/ENU/?guid=OARX-RefGuide-AcDbHostApplicationServices__workingDatabase
setWorkingDb is short for
https://help.autodesk.com/view/OARX/2024/ENU/?guid=OARX-RefGuide-AcDbHostApplicationServices__setWorkingDatabase_AcDbDatabase_
usually curDb and workingDb are the same, but there may be times where you would set the working database to a side database.
PyRx/PyRxCore/PyAcDb.cpp
Lines 56 to 71 in cbcdbf2