Jump to content
Sign in to follow this  
calsan

Layer name wildcard

Recommended Posts

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:

Share this post


Link to post

I've wondered that too! I think it works with almost everything except layers.

Gotta be a bug.

mk

Share this post


Link to post

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);

Share this post


Link to post

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

Share this post


Link to post
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...

Share this post


Link to post

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...