I am writing a function that will allow the user to change size of text - this text is refdes such as R1, C1, etc. on Silkscreen Top layer. The user draws a box and all text dbids that are included in the box will be changed to a user defined Text Block size value. Problem is that I am unable to figure out how to exlude text such as pin number, etc. I was thinking of checking for the "layer" attribute for selected text - is there "layer" attribute for text? If not, any other ideas?
I suppose that if you get the text dbid then you will be able to get to the parent and from there figure out what the text belongs to.
You could also save the current visibility settings, then turn on refdes text, outlines etc. and then make the user select an area.
In reply to Ejlersen:
Thanks Ole. I tried this but I don't think this will be easy. I also thought that text can be differentiated by the parent they belong to, such as pin for pin number text and symbol for refdes text, but it's not like that. For one, the parent for different texts (pin number & refdes) is "dbid" and type on the parent does not help. I think the Attributes list for text can be made larger to include layer, etc. info.
In reply to Khurana:
I think it would be rather easy
saveVis = axlVisibleGet() ; clear all visibility settingsaxlVisibleDesign(nil) ; hide everythingaxlVisibleLayer("Package Geometry/Silkscreen_Top" t) ; show outlines on pg silksreenaxlVisibleLayer("Package Geometry/Silkscreen_Bottom" t)axlVisibleLayer("Ref Des/Silkscreen_Top" t) ; show refdes on silkscreenaxlVisibleLayer("Ref Des/Silkscreen_Bottom" t)axlVisibleUpdate(t) ; update display
Now do what every you want to do in your code
axlVisibleSet(saveVis) ; restore visibility settings
Ole, you're right. Thank you.
Just wanted to add that in v16.3 (or even prior versions) there's a text attribute for text...the book didn't show it, but using ->? I could see it and also use it...