Jump to content
Developer Wiki and Function Reference Links ×

Select PIO's on Sheet Layers


Recommended Posts

Draw a rectangle on any sheet layer, that is just a bit bigger than the page size. Give it a unique name like 'Custom-Select-Rect'. Run the script below and substitute your PIO name for My PIO Name

 

ForEachObject(SetSelect, ((LOC='Custom-Select-Rect') & (PON='My PIO Name')));

 

This will select the objects on ALL sheet layers.

Link to comment

Thanks Julian,

This works perfect to select the PIO - as I asked in my post - and I hoped this answer would solve my problem.

 

Actually I'm trying to use something like the title block feature "apply to all title blocks" (loosely translated).

In my PIO I've managed to create a text that is linked to a RField, a custom dialog sets the RField and edits the text on a sheet layer.

The suggested criteria can select the PIO, but it doesn't help to edit the text on all the sheet layers, I guess I will have to revise the procedure I've used in ForEachObject(Procedure, Criteria).

 

Are there any other criteria that refer to sheet layers, I know GetObjectVariableInt (ObjHandle, 154) should return '2' for sheet layers, but this knowledge doesn't seem to help out here, I can't use it to set the criteria.

 

Thanks again,

Dimitri.

 

Edited by DeSignature
Link to comment

So what you really want to do is use ForEachObject for each instance of a PIO that is on any sheet layer in the drawing?

 

ForEachObject is probably not the best way to do this. Consider using ForEachObjectInLayer within a loop that check to see if it is a Sheet Layer and if it is then alls the ForEachObjectInLayer procedure. Your Execute Function would have to check each object in the layer to see if it matches your PIO type and if so then makes the change if not then it ignores it.

 

Ask again if you need more help.                 

Link to comment

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.

×
×
  • Create New...