Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ilogic form, add the iprop summary, comments??

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
amasva
3840 Views, 8 Replies

Ilogic form, add the iprop summary, comments??

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

Asle Martin Svastuen
Autodesk Product Design Suite Ulitmate 2012 Sp1 / Vault Collaboration 2012 Sp1
HP EliteBook 8560w
Intel(R)Core(TM) i7 CPU Q 720 @ 2,0GHz 2,0GHz
16GB RAM
Windows 7 X64 SP1
8 REPLIES 8
Message 2 of 9
xiaoyan.qi
in reply to: amasva

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
amasva
in reply to: xiaoyan.qi

Hi. This may work 🙂

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

Asle Martin Svastuen
Autodesk Product Design Suite Ulitmate 2012 Sp1 / Vault Collaboration 2012 Sp1
HP EliteBook 8560w
Intel(R)Core(TM) i7 CPU Q 720 @ 2,0GHz 2,0GHz
16GB RAM
Windows 7 X64 SP1
Message 4 of 9
xiaoyan.qi
in reply to: amasva

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

 

Message 5 of 9
amasva
in reply to: xiaoyan.qi

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?

Asle Martin Svastuen
Autodesk Product Design Suite Ulitmate 2012 Sp1 / Vault Collaboration 2012 Sp1
HP EliteBook 8560w
Intel(R)Core(TM) i7 CPU Q 720 @ 2,0GHz 2,0GHz
16GB RAM
Windows 7 X64 SP1
Message 6 of 9
xiaoyan.qi
in reply to: amasva

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

Message 7 of 9
amasva
in reply to: xiaoyan.qi

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.

Asle Martin Svastuen
Autodesk Product Design Suite Ulitmate 2012 Sp1 / Vault Collaboration 2012 Sp1
HP EliteBook 8560w
Intel(R)Core(TM) i7 CPU Q 720 @ 2,0GHz 2,0GHz
16GB RAM
Windows 7 X64 SP1
Message 8 of 9
Gabriel_Watson
in reply to: amasva

I believe what you were looking for is: iProperties.Value("Summary", "Comments") = "My string of comments" & vbLf & "with multiple lines"
Message 9 of 9
c.gouldRZXXJ
in reply to: amasva

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. 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report