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: 

Find name titleblock

1 REPLY 1
Reply
Message 1 of 2
PolemEngineering
262 Views, 1 Reply

Find name titleblock

I'm writing a tool to change iproperties in the titleblock.

But now we start using two different types of titleblocks.

I need to check which titleblock is present in the current sheet/drawing.

 

I use this code to place a titleblock:

 

Call Doc.ActiveSheet.AddTitleBlock("sample_titleblock")

 

How do I check if "sample_titleblock" is already present?

 

1 REPLY 1
Message 2 of 2

Try something like... 

 

Dim currentTBname as string

currentTBname = Doc.ActiveSheet.TitleBlock.Name

if currentTBname = "sample_titleblock" ...

 

You will have to place error catching code for the event that no title block exists on the document, the line currentTBname = Doc.ActiveSheet.TitleBlock.Name throws a Object Not Set type error.

P. Andrew White, P.Eng
Manufacturing Engineering Manager
Silent-Aire Manufacturing

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

Post to forums  

Autodesk Design & Make Report