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 Automatic Change of Drawing Title Block

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
1529 Views, 2 Replies

iLogic Automatic Change of Drawing Title Block

Hi everyone,

 

I am currently working with fx parameters and iLogic to drive a model and it's corresponding drawing to change based on a single user parameter.

 

I have managed to get the drawing to update both the scale of the views I need and the size of the sheet with the change in parameter using the following rule:

 

IfParameter("EB75551.ipt.Rise")<1801Then
ActiveSheet.ChangeSize("A1", MoveBorderItems :=True)
ElseIfParameter("EB75551.ipt.Rise")>1800Then
ActiveSheet.ChangeSize("A2", MoveBorderItems :=True)
EndIf

However when i attempt to use this with the title block using the function:

ActiveSheet.TitleBlock="My Title Block"

in place of the sheet change size it brings up the error message:

 

Error in rule: Drawing Title Block, in document: Drawing

The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

 

I have read elsewhere that this is due to me having prompted entries for the scale and drawn by fields, however when i use the function designed for prompted entries:

ActiveSheet.SetTitleBlock("Other Title Block", "promptedEntry1", "promptedEntry2")

It fills in the prompted entry fields from the code and if i change these entries in the "edit field" option they are overwritten when it is updated.

 

Is there a way have the prompted entries when you open the drawing fill in the "promptedEntry1" field in the rule so that I can use the rule? Or am I going about it the wrong way?

 

I should point out i'm new to iLogic and no-one in my workplace can use it so each person changing the "promptedEntry1" field to the scale they wish isn't a wise move.

 

Thanks for your help! 

 

Joe

2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

I inserted this: ActiveSheet.View("VIEW1").ScaleString
In place of the "promptedEntry2" phrase and that has brought the scale through, however i still need a way for the prompted entry "Drawn by" field to come through in the rule once a user has inputted it
Message 3 of 3
adam.nagy
in reply to: Anonymous

Hi,

 

If all title blocks have the same prompted entries then you could just
1) create a list of the current ones with their corresponding values

2) swap the title block and fill it with the values you stored

 

http://adndevblog.typepad.com/manufacturing/2013/04/synchronize-prompted-entry-textbox-values-.html

 

Cheers,

 



Adam Nagy
Autodesk Platform Services

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

Post to forums  

Autodesk Design & Make Report