Hi Mhawley1, Please find a sample tcl code iterating over comment text dumping previous value and changing the value. set lSession $::DboSession_s_pDboSession DboSession -this $lSession set lNullObj NULL set lStatus [DboState] set lDesign [$lSession GetActiveDesign] #setting my value in cstring. set lMyText [DboTclHelper_sMakeCString "Cadence"] #Getting schematic iter. set lSchematicIter [$lDesign NewViewsIter $lStatus $::IterDefs_SCHEMATICS] #get the first schematic view set lView [$lSchematicIter NextView $lStatus] # set lPage_Name [DboTclHelper_sMakeCString] while { $lView != $lNullObj} { #dynamic cast from DboView to DboSchematic set lSchematic [DboViewToDboSchematic $lView] $lSchematic GetName $lSchi_Name set lPagesIter [$lSchematic NewPagesIter $lStatus] #get the first page set lPage [$lPagesIter NextPage $lStatus] # puts [DboTclHelper_sGetConstCharPtr $lSchi_Name] while {$lPage!=$lNullObj} { # puts [DboTclHelper_sGetConstCharPtr $lPage_Name] # set lPartInstsIter [$lPage NewPartInstsIter $lStatus] set lCommentsIter [$lPage NewCommentGraphicsIter $lStatus] set lGraphic [$lCommentsIter NextCommentGraphic $lStatus] while {$lGraphic!=$lNullObj} { set lType [$lGraphic GetObjectType] if {$lType == $::DboBaseObject_GRAPHIC_COMMENTTEXT_INST} { set lTextInst [DboGraphicInstanceToDboGraphicCommentTextInst $lGraphic] #Get commnet box dbid set lDef [$lTextInst GetDboCommentText] #Getting the current value set lState [$lDef GetText $lGetCString] #COnverting cs string to tcl string. puts [DboTclHelper_sGetConstCharPtr $lGetCString] #Setting a new value of comment text box set lState [$lDef SetText $lMyText] if {[$lState OK] == 1} { puts "successfully updated the text value" } #placeholder: do your processing on $lTextInst #get the next graphics of the page } set lGraphic [$lCommentsIter NextCommentGraphic $lStatus] } delete_DboPageCommentGraphicsIter $lCommentsIter set lPage [$lPagesIter NextPage $lStatus] } delete_DboSchematicPagesIter $lPagesIter #get the next schematic view set lView [$lSchematicIter NextView $lStatus] } delete_DboLibViewsIter $lSchematicIter Hope it helps
↧