Tuesday, March 26, 2024

TraceBoundary sample in Python for AutoCAD

 

 

import traceback
from pyrx_imp import Rx
from pyrx_imp import Ge
from pyrx_imp import Gi
from pyrx_imp import Db
from pyrx_imp import Ap
from pyrx_imp import Ed
from pyrx_imp import Gs

def PyRxCmd_TB() -> None:
    try:
        db = Db.curDb()
        prtes = Ed.Editor.getPoint("\nPick a point")
        if prtes[0] != Ed.PromptStatus.eOk:
            return
       
        for pline in Ed.Editor.traceBoundary(prtes[1], False):
            pline.setColorIndex(1)
            db.addToCurrentspace(pline)
           
    except Exception as err:
        traceback.print_exception(err)



 

 

TraceBoundary sample in Python for AutoCAD

    import traceback from pyrx_imp import Rx from pyrx_imp import Ge from pyrx_imp import Gi from pyrx_imp import Db from pyrx_imp...