iLogic Automatic Change of Drawing Title Block

Discuss Autodesk Inventor. Post your comments and questions about Inventor here.
no avatar

Joel89
MCAD Lurker

iLogic Automatic Change of Drawing Title Block

Postby Joel89 » Wed Nov 13, 2013 11:05 am

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")<1801ThenActiveSheet.ChangeSize("A1", MoveBorderItems :=True)ElseIfParameter("EB75551.ipt.Rise")>1800ThenActiveSheet.ChangeSize("A2", MoveBorderItems :=True)EndIfHowever 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!
no avatar

Joel89
MCAD Lurker

Re: iLogic Automatic Change of Drawing Title Block

Postby Joel89 » Wed Nov 13, 2013 11:31 am

Update:
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.

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 2 guests