iLogic in IDW/Property for Number of Sheets

iLogic in IDW/Property for Number of Sheets

solson
Advocate Advocate
1,492 Views
2 Replies
Message 1 of 3

iLogic in IDW/Property for Number of Sheets

solson
Advocate
Advocate

I am working on iLogic rule, part of what I need the rule to do is to change the border on all of the sheets in the current idw.  I have seen how to get iLogic to change it on the active sheet, but I am concerned about what will happen on a multi-sheet drawing.  So the final piece of the puzzle for my rule is: is there a way to change the borders on all of the sheets with one command or is there a property/variable the that knows how many sheets are in the idw files.  I currently have a loop that will cycle through all of the sheets changing the border, so if I figure how to have my rule read that variable/property, I should be in good shape.

 

Thanks for you help.

 

Steve


Steve Olson
Manager, Training Services
https://knowledge.autodesk.com/profile/O37DF451BDD2485B
https://www.youtube.com/channel/UCgQTCawsuRFJVSHRXIwLdtg
0 Likes
Accepted solutions (1)
1,493 Views
2 Replies
Replies (2)
Message 2 of 3

MjDeck
Autodesk
Autodesk
Accepted solution

Without looking at the total number of sheets, you can iterate through all the sheets and set the border like this:

For Each sheetX As Sheet In ThisDrawing.Document.Sheets
  ThisDrawing.Sheet(sheetX.Name).Border = borderName
Next

 You can also read the number of sheets with code like this:

Dim sheetCount As Integer = ThisDrawing.Document.Sheets.Count


Mike Deck
Software Developer
Autodesk, Inc.

0 Likes
Message 3 of 3

solson
Advocate
Advocate

Mike,

 

That works.  Thanks a lot.

 

Steve


Steve Olson
Manager, Training Services
https://knowledge.autodesk.com/profile/O37DF451BDD2485B
https://www.youtube.com/channel/UCgQTCawsuRFJVSHRXIwLdtg
0 Likes