Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
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: 

User Parameter driven Subassembly

5 REPLIES 5
Reply
Message 1 of 6
Formsprag
366 Views, 5 Replies

User Parameter driven Subassembly

Good morning everyone,

 

Been a while since I created any iLogic driven forms and I struggling a bit.

 

Basically I have a parent file the has several user parameters driven through a Form.

 

I need to take the same Parent file and insert it into a subassembly; while in the subassembly state drive the user parameters in the Parent file through a new form in the subassembly. 

 

This is currently being attempted in 2019, is this even possible?  

5 REPLIES 5
Message 2 of 6
Formsprag
in reply to: Formsprag

A little more detail:

 Parent assembly simple lathe setup with three (3) User defined parameters

 

Formsprag_0-1650295550913.png

Formsprag_1-1650295586095.png

 

This Parent Assembly is then used to create a new Assembly for users to finish added various parts and subassemblies to illustrate various setups.

Formsprag_2-1650295744809.png

Formsprag_3-1650295788649.png

 

What we are looking for is a way for the user parameters to be editable in the new assembly. The thought process is the Parent file can be updated and trickle down through all the variations.

 

Is there a way to parse the equation in the subassembly User Assembly that will allow the user to set up each newly created file.

 

 

Message 3 of 6

Hi @Formsprag 

 

I might be missing something in the workflow. But I think you might just need to create 2 new rules, one in the subassembly to open the form, and one in the top level assembly (or as an external rule) to run the rule in the sub assembly to open the form.

 

  1. In the sub assembly (Test.iam) create a rule called: "ShowForm" (or something similar)
    1. In this rule add a line to show the form:   iLogicForm.Show("Test Stand")
  2. In the top level assembly, or as an external rule create a rule called:  "GetForm" (or something similar)
    1. In this rule add a line to run a rule in Test.iam:   iLogicVb.RunRule("Test.iam", "ShowForm")

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

Message 4 of 6

After some thought the better workflow may be to open the "Parent" File (Form triggers upon opening). Have the user fill in all the variables and "Apply" the settings. 

 

iLogic would then run to apply all settings and create a new .iam with the "Parent" being the first Subassembly in the newly created file.

 

The problem I have with this work flow is how to "Stick" those user settings  without reverting back to the "Parent".

 

Thanks for your input Curtis, I'm trying your workflow now.

Message 5 of 6

What am I missing?

Formsprag_0-1650391778864.png

 

 

Message 6 of 6

Hi @Formsprag ,

 

My apologies for the confusion, my example was only correct if the assembly is in use as a subassembly by the assembly the rule is in.

 

For example, in your screen shot the subassembly occurrence called test:1, we could run a rule within it called ShowForm, by using either of these lines:

 

iLogicVb.RunRule("test:1", "ShowForm")

    or

iLogicVb.RunRule("test.iam", "ShowForm") 

 

From the error, I'm guessing the subassemly was not present in the top level assembly?

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

Curtis_Waguespack_0-1650394858693.png

 

 

 

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

Post to forums  

Autodesk Design & Make Report