calsan Posted December 11, 2015 Share Posted December 11, 2015 I'm trying to find objects in layers whose name contains (for example) "250" Why does this work for classes: SelectObj(C='*250*'); but wildcard search doesn't work for layers: SelectObj(L='*250*'); :confused: Quote Link to comment
michaelk Posted December 11, 2015 Share Posted December 11, 2015 I've wondered that too! I think it works with almost everything except layers. Gotta be a bug. mk Quote Link to comment
calsan Posted December 11, 2015 Author Share Posted December 11, 2015 I wonder if there is an alternative routine to find by layer name? I tried this and it doesn't work either... PROCEDURE PickLayer250; PROCEDURE SelectThem(h :HANDLE); BEGIN SetSelect(h); END; BEGIN ForEachObject(SelectThem, L='*250*'); END; RUN (PickLayer250); Quote Link to comment
michaelk Posted December 11, 2015 Share Posted December 11, 2015 I wonder if you could use the Pos function. If it returns something other than 0, then the substring is present in the layer name. Seems like a hack, but it might work. mk Quote Link to comment
Dieter @ DWorks Posted December 11, 2015 Share Posted December 11, 2015 I'm trying to find objects in layers whose name contains (for example) "250" Why does this work for classes: SelectObj(C='*250*'); but wildcard search doesn't work for layers: SelectObj(L='*250*'); :confused: Probably because classes and layers are in another internal list. Layers have their own internal list, classes and all other objects are in the 'main' object list. What you could do is first find all layers, filter out those that doesn't fit your search criteria, then create your search criteria based on that and then do the selection. I know this will be more work... Quote Link to comment
calsan Posted December 14, 2015 Author Share Posted December 14, 2015 OK, thanks guys. At least there is an underlying logic to why it doesn't work! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.