DeSignature Posted March 21, 2020 Share Posted March 21, 2020 Hi, Could anybody help me out with the criteria to select a PIO on every Sheet Layer? Thanks. Quote Link to comment
Julian Carr Posted March 22, 2020 Share Posted March 22, 2020 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. Quote Link to comment
DeSignature Posted March 22, 2020 Author Share Posted March 22, 2020 (edited) 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 March 22, 2020 by DeSignature Quote Link to comment
Pat Stanford Posted March 23, 2020 Share Posted March 23, 2020 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. Quote Link to comment
DeSignature Posted March 23, 2020 Author Share Posted March 23, 2020 Thanks Pat, I'll give it a few tries, and I will cry out for help if get too desperate. Dimitri. Quote Link to comment
DeSignature Posted March 24, 2020 Author Share Posted March 24, 2020 (edited) I have moved my cry for help to a new topic 'Edit item in several PIO's via widget button' since the original problem has been solved. Edited March 24, 2020 by DeSignature 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.