Inventor Customization

Inventor Customization

New Member
2 Posts
0 Kudos
Registered: ‎01-19-2011
Post 1 of 3

iLogic Automatic Change of Drawing Title Block

657 Views, 2 Replies
11-13-2013 03:01 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:


ActiveSheet.ChangeSize("A1", MoveBorderItems :=True)
ActiveSheet.ChangeSize("A2", MoveBorderItems :=True)

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! 



New Member
2 Posts
0 Kudos
Registered: ‎01-19-2011
Post 2 of 3

Re: iLogic Automatic Change of Drawing Title Block

11-13-2013 03:25 AM in reply to: joejoelind
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
ADN Support Specialist
651 Posts
103 Kudos
Registered: ‎03-26-2007
Post 3 of 3

Re: iLogic Automatic Change of Drawing Title Block

11-22-2013 06:26 AM in reply to: joejoelind



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




Adam Nagy
Developer Technical Services
Autodesk Developer Network
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!