Ilogic form, add the iprop summary, comments??

Ilogic form, add the iprop summary, comments??

Anonymous
Not applicable
4,800 Views
8 Replies
Message 1 of 9

Ilogic form, add the iprop summary, comments??

Anonymous
Not applicable

Is it possible to add the iproperty summary, comments to a ilogic form?? Can't find it in the list..

0 Likes
Accepted solutions (2)
4,801 Views
8 Replies
Replies (8)
Message 2 of 9

xiaoyan.qi
Alumni
Alumni

Hi Martin

 

As far as i know, There is no directly way to add summary->comments, but you can add a Text parameter and make it to set Comments by a rule, then add the parameter to Form, it can get the expected result(Note: you need to set the parameter for Comments as Multi-line Text Box in the Form ), see my attached simple part for details

 

Let me know if it works

Thanks

Mick

Message 3 of 9

Anonymous
Not applicable

Hi. This may work 🙂

But I'm wondering, what triggers the rule "DriveComments"?

0 Likes
Message 4 of 9

xiaoyan.qi
Alumni
Alumni

Hi, Martin

 

By default, the rule will run automatically when the related parameters change or change comment from Form dialog and click Done unless you check "Don't run automatically " option in the rule option. (see attached picture for the option)

Note: change the other paramters will not trigger the rule.

 

 

Here is some detailed information from Inventor wikihelp

    Rules usually run automatically in response to changes in parameter values, if the parameters are used directly as variables in the rule. You can also trigger rules by events.

   A rule runs immediately after you edit it, unless it is suppressed. When rules run, changes in the parameters do not update the model until after the rule runs. If necessary, you can force parameter changes to take effect immediately using either:

  • the Parameterfunction
  • the RuleParametersOutput() function in the rule

 

Hope it's helpful

Thanks

Mick

 

0 Likes
Message 5 of 9

Anonymous
Not applicable

Thanks, I was not aware of that 🙂 One more thing. I have tried, but not yet found a way to create a (new) parameter with a ilogic rule. Do you know if it is possible?

0 Likes
Message 6 of 9

xiaoyan.qi
Alumni
Alumni
Accepted solution

Hi, Martin

 

there is no exist iLogic Statement to create customer parameters, but you can created with API code, see iLogic Code below

==========================================================

doc = ThisDoc.Document

doc.ComponentDefinition.Parameters.UserParameters.AddByValue("LengthParameterName", 5, UnitsTypeEnum.kInchLengthUnits)
doc.ComponentDefinition.Parameters.UserParameters.AddByValue("BooleanParameterName", True , UnitsTypeEnum.kBooleanUnits)
doc.ComponentDefinition.Parameters.UserParameters.AddByValue("TextParameterName", "Textword", UnitsTypeEnum.kTextUnits)

==========================================================

 

And before create the paramters by iLogic code, you need check whether there is exist parameter with the same name, or the iLogic will create the paramter with the name  suffix "_1", it need additional code to check it, so i recommend you to create the paramter by manual

 

Thanks

Mick

0 Likes
Message 7 of 9

Anonymous
Not applicable

Hi

 

I have acepted this as a solution but not used it 😉 I have used ilogic to create a custom parameter and then copy this parameter to the properti "comments". The custom parameter is added to my form.

0 Likes
Message 8 of 9

Gabriel_Watson
Mentor
Mentor
I believe what you were looking for is: iProperties.Value("Summary", "Comments") = "My string of comments" & vbLf & "with multiple lines"
0 Likes
Message 9 of 9

c.gouldRZXXJ
Explorer
Explorer
Accepted solution

Not sure if this is still an issue for you, but I found this workaround helpful. I created an input box, since Autodesk doesnt support this iProperty at the moment. Function is basically the same as if the iProperty was loaded into the form.

 

For us, the revision description box is linked to the summary contents iProperty, so you might want to change the prompts that display to your users.

 

1. Create External Rule with below code:

iProperties.Value("Summary", "Comments") = InputBox("E.g. ISSUED FOR CONSTRUCTION", "Type Revision Description",iProperties.Value("Summary", "Comments"))

2. Load External Rule in Global Form.

3. User needs click only 1 button, preloads current information if the user wants to keep it, but allows user to alter it if different.

 

Only issue is getting all users equipped with external rules, but if you are running global forms, it should already be manageable. I find vault helpful for distributing/updating global forms and external rules across a network of users too.