Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic in IDW/Property for Number of Sheets

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
solson
1186 Views, 2 Replies

iLogic in IDW/Property for Number of Sheets

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
2 REPLIES 2
Message 2 of 3
MjDeck
in reply to: solson

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.

Message 3 of 3
solson
in reply to: MjDeck

Mike,

 

That works.  Thanks a lot.

 

Steve


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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report