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 rule to change Title Blocks

21 REPLIES 21
SOLVED
Reply
Message 1 of 22
SeanFarr
10891 Views, 21 Replies

iLogic rule to change Title Blocks

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!

Sean Farr
Product Designer at TESInc.ca

Inventor Professional 2014-Update 2 - AutoCAD Electrical 2014
Win7-x64 | ASUS P8Z77-V | i7 3770 -3.4 GHz | 32GB RAM |
240GB SSD | nVidia GTX 670 4GB - 320.49
21 REPLIES 21
Message 21 of 22
Ing_Jairo_Meza
in reply to: SeanFarr

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.

Message 22 of 22

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

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

Post to forums  

Autodesk Design & Make Report