Inventor Customization

Inventor Customization

Reply
New Member
joejoelind
Posts: 2
Registered: ‎01-19-2011
Message 1 of 3 (476 Views)

iLogic Automatic Change of Drawing Title Block

476 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:

 

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

New Member
joejoelind
Posts: 2
Registered: ‎01-19-2011
Message 2 of 3 (468 Views)

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
adam.nagy
Posts: 567
Registered: ‎03-26-2007
Message 3 of 3 (387 Views)

Re: iLogic Automatic Change of Drawing Title Block

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

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
Developer Technical Services
Autodesk Developer Network
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.