iLogic Automatic Change of Drawing Title Block

iLogic Automatic Change of Drawing Title Block

Anonymous
Not applicable
1,673 Views
2 Replies
Message 1 of 3

iLogic Automatic Change of Drawing Title Block

Anonymous
Not applicable

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

0 Likes
1,674 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
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
0 Likes
Message 3 of 3

adam.nagy
Autodesk Support
Autodesk Support

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
0 Likes