iLogic rule to change Title Blocks

iLogic rule to change Title Blocks

Anonymous
Not applicable
12,662 Views
21 Replies
Message 1 of 22

iLogic rule to change Title Blocks

Anonymous
Not applicable

Hello,

 

I can't for some reason get this rule to work, simply want to be able to choose what title block to use.

I created a text parameter with the multi-values: TES ELE and TES EQU

I have 2 title blocks in my template called TES ELE and TES EQU

Here is my code, basically, I want to rule to apply the title block based on the selection, which will be done on a form.

If Title = "TES ELE" Then
ActiveSheet.TitleBlock = "TES ELE"

ElseIf Title = "TES EQU" Then
ActiveSheet.TitleBlock = "TES EQU"

End If

InventorVb.DocumentUpdate()

ThisApplication.ActiveView.Fit

 I have found many threads in this forum and have used their solutions for this rule, but for some reason, my rule will not select the title block and place it in the drawing.

Here is a snap of my set-up and my template file is attached

title block.png

 

 

Thanks!

Accepted solutions (1)
12,663 Views
21 Replies
Replies (21)
Message 21 of 22

Anonymous
Not applicable

Hello SeanFarr, I had the same problem with the prompted entrys and got solve, my question to you is what is the code for the multi-opcion box that you present in this message?

 

Thanks.

0 Likes
Message 22 of 22

frederik_vollbrecht
Advocate
Advocate

Hi,

 

auch wenn es nicht mehr ganz aktuell ist, habe mir ein snip geschrieben, der zwischen englischer und deutscher Vorlage umschaltet:

 

'switching between predifined title blocks

'If title german, switch to english
If ActiveSheet.TitleBlock="Vorlage Schriftfeld" Then
ActiveSheet.TitleBlock = "template titleblock"

'if title english, switch to german
ElseIf ActiveSheet.TitleBlock="template titleblock" Then
ActiveSheet.TitleBlock = "Vorlage Schriftfeld"

End If

InventorVb.DocumentUpdate()

ThisApplication.ActiveView.Fit

Als Vorlagename ist die Bezeichnung eures Schriftfeldes zu wählen.

 

 

Gruß

 

Frederik