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: 

using iLogic to automatically change Title Block size based on Border size

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Greatwhitenorth
2014 Views, 3 Replies

using iLogic to automatically change Title Block size based on Border size

Hi all,

 

I'm trying to create a rule that will change the Title Block size based on what Border size the user changes to.  The default drawing template is a B size, but if the user was to change it to a D size, the Title Block is too small.

 

This is what I have done so far:

 

If ActiveSheet.Size Is "A" Then

ActiveSheet.TitleBlock = "TitleBlock Small"

 

ElseIf ActiveSheet.Size Is "B" Then

ActiveSheet.TitleBlock = "TitleBlock Small"

 

ElseIf ActiveSheet.Size Is "C" Then

ActiveSheet.TitleBlock = "TitleBlock Large"

 

ElseIf ActiveSheet.Size Is "D" Then

ActiveSheet.TitleBlock = "TitleBlock Large"

 

End If

 

I works, but only if the user manually runs the rule.  Is there a way to have it automatically run when the Border changes?

 

Thanks in advance.

 

Bob

____________________________________________________
Product Design & Manufacturing Collection 2021 | Vault Professional 2021
Dell Precision 7670 | Intel i7-12850HX - 2100 Mhz - 64GB
nVIDIA RTX A3000 12GB | Windows 10/64 Pro
3 REPLIES 3
Message 2 of 4

Message 3 of 4
MjDeck
in reply to: Greatwhitenorth

Bob,

Unfortunately, there's no way to run the rule when the border changes.  There's only a few drawing events available.  I would recommend running the rule on the Before Save Document event.  You can attach the rule to this event by using the Event Triggers command on the iLogic tab:

EvenTriggersBeforeSave.png

 


Mike Deck
Software Developer
Autodesk, Inc.

Message 4 of 4

Thanks Curtis.  I used Jonathan's sample code to create mine.  Works like a charm!

 

Bob

____________________________________________________
Product Design & Manufacturing Collection 2021 | Vault Professional 2021
Dell Precision 7670 | Intel i7-12850HX - 2100 Mhz - 64GB
nVIDIA RTX A3000 12GB | Windows 10/64 Pro

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

Post to forums  

Autodesk Design & Make Report