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

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

Greatwhitenorth
Collaborator Collaborator
2,442 Views
3 Replies
Message 1 of 4

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

Greatwhitenorth
Collaborator
Collaborator

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 2025 | Vault Professional 2025
Dell Precision 7670 | Intel i7-12850HX - 2100 Mhz - 64GB
nVIDIA RTX A3000 12GB | Windows 11 Pro
0 Likes
Accepted solutions (1)
2,443 Views
3 Replies
Replies (3)
Message 2 of 4

Curtis_W
Consultant
Consultant
Accepted solution

HI bstewart,

 

This link from Jonathan Landeros' blog might help:

http://inventor-tales.blogspot.com/2010/11/drawing-conclusions-on-formatting.html

 

and this one might be of interest as well:

http://inventortrenches.blogspot.com/2011/05/use-ilogic-to-change-sheet-orientation.html

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

EESignature

Message 3 of 4

MjDeck
Autodesk
Autodesk

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.

0 Likes
Message 4 of 4

Greatwhitenorth
Collaborator
Collaborator

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

 

Bob

__________________________________________________________
Product Design & Manufacturing Collection 2025 | Vault Professional 2025
Dell Precision 7670 | Intel i7-12850HX - 2100 Mhz - 64GB
nVIDIA RTX A3000 12GB | Windows 11 Pro
0 Likes