I had a question, which is not related to the topic.
I was trying to extract name of instance from layout XL, and every instnace has a " | " in starting eg. "|M1". Now when i was trying to save the name as inst~>name, it saves as " "|M1" ", i.e with quotation. Is there a way to convert this string to symbol. i need just |M1.
i had a case where the inst name was " "|M1.1" " also.
If it is not related to the topic, you should really
create a new thread (as the Forum Guidelines tell you to do). So I split it into a new thread to avoid confusion.
don't understand - are you saying that the instance names have embedded
quotation marks? That sounds very odd, and I've not seen that before.
You can of course convert a string to a symbol (e.g. with stringToSymbol() ), but I somehow doubt you really want to do that.
I think the "ParseString()" would be helpful.
here is a skill code ,maybe it will help you.
/*Synopsis : CreateXL_Label()Version : 1.0Create Date : 2007-09-13Author : Justin WangE-Mail : firstname.lastname@example.org*/hiSetBindKey("Layout" "Ctrl<Key>l" "CreateXL_Label()")procedure(CreateXL_Label()prog((winId cvId Shapes Layer shp Box llx lly urx ury Text)winId = hiGetCurrentWindow()cvId = getEditRep(winId)Shapes = geGetSelSet(cvId)Layer = list("TEXT" "drawing")foreach(shp Shapesif((shp~>objType == "inst" ) thenBox = shp~>bBoxllx = car(car(Box))lly = cadr(car(Box))urx = car(cadr(Box))ury = cadr(cadr(Box))Text = car(parseString(shp~>name)); example: |M36.1 ---> |M36.1
;Text = car(parseString(shp~>name "|")); example: |M36.1 ---> |M36.1
;Text = car(parseString(shp~>name "|.")); example: |M36.1 ---> M36if((urx-llx < ury-lly) thendbCreateLabel(cvId Layer (llx+urx)/2:(lly+ury)/2Text "centerCenter" "R90" "stick" (ury-11y)/10 )elsedbCreateLabel(cvId Layer (llx+urx)/2:(lly+ury)/2Text "centerCenter" "R0" "stick" (urx-llx)/10 ));if);if);foreach);prog);procedure