Danielm103 Posted 10 hours ago Posted 10 hours ago Python, makes Batch processing a bit easier sometimes import traceback from pyrx import Ap, Db def capcaseLayers(db: Db.Database): lt = Db.LayerTable(db.layerTableId()) for name, id in lt.toDict().items(): l = Db.LayerTableRecord(id, Db.OpenMode.kForWrite) l.setName(name.upper()) def processDb(fpath: str): sdb = Db.Database(False, True) sdb.readDwgFile(fpath) sdb.closeInput(True) capcaseLayers(sdb) sdb.saveAs(fpath) #add new command @Ap.Command() def caplayers(): try: for fpath in Ap.Application.listFilesInPath("E:\\temp", ".dwg"): processDb(fpath) except Exception as err: traceback.print_exception(err) Quote
Clint Posted 8 hours ago Posted 8 hours ago I will investigate this excellent suggestion further! I have Python installed and am learning it now. Best regards, Clint Hill Quote
Danielm103 Posted 1 hour ago Author Posted 1 hour ago The PIP is here ‘pip install cad-pyrx’ https://pypi.org/project/cad-pyrx/, the project is here https://github.com/CEXT-Dan/PyRx It’s an amalgamation of BRX and ActiveX APIs. There’s some stuff for BIM as well. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.