I have written the following code for creating a shielded path. The below mentioned code is having a fix set of coordinates: i.e. "pts". How to add the functionality that a user can draw shield where ever he feels like:
;; Create a shielded pathprocedure( shield()errset((let (cv layer purpose list_draw_layer tech width1 tfId)cv= geGetEditCellView()layer = car(leGetEntryLayer()) ;displays layer on LSW is takenpurpose = cadr(leGetEntryLayer()); displays drawing or pin on the selected lswlist_draw_layer =list(layer purpose)tech = techGetTechFile(geGetWindowCellView()); rule deck file id is stored in techwidth1 = techGetSpacingRule(tech "minWidth" layer) ; the minimum width is stored in width1rodCreatePath(?name "shield"?layer list( layer purpose )?pts list(2:-15 2:-5 15:-5 15:-15) If this is not fixed, the user can draw shield anywhere. What changes are needed??width .8?justification "center"?cvId cv?offsetSubPathlist(list(?layer list( layer purpose )?justification "left"?sep 1?width .4) ;end of offset sublist1list(?layer list( layer purpose )?justification "right"?sep 1?width .4) ;end of offset sublist2) ;end of offset list of lists) ;end of rodCreatePath) ; end of lett) ; end of errset) ; end of procedure
Sorry if I have already pointed you to this code, but I think that it contains all that you need
How can I created slotted metal paths?
You will see in this code that there is use of the enterPath function, as well as an options form (CCSslotMetalForm) for the command ("CCSslotMetal" in this case), and the width value on the form is passed to the enter function and ultimately the underlying command that calls rodCreatePath(), which is CCSslotMetalCB(), the callback function that actually does the work.
The code is somewhat lengthy and is probably best not just pasted here, so please take a look at the above Solution link, or just the code at: CCSslotMetal.il