Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Assembly update with iLogic

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
Anonymous
16009 Views, 10 Replies

Assembly update with iLogic

Hi

 

I have an assembly which contains a rectangular pattern of a component, and nothing else. The number of components in the pattern is controlled by an iLogic-rule. The iLogic-rule recieves its parameter values from an external file.

 

Problem:

When I open the external file and change the parameter values, the assembly doesn't seem to update correctly. In fact, it doesn't update at all until I open the rule browser in the assembly, right-clock the rule and choose "Run Rule", and then hit the Update-button.

 

Do I really have to go through this procedure to update the pattern? I think it should update without me having to manually engage the rule.

 

The attached files should illustrate the problem. The assembly "Pattern" contains a simple pattern of the part "block". The file "Skeleton" contains the parametric values. Try and change the parameter "Length" by 100, and the number of instances in the pattern i supposed to change.

 

I would be grateful for any help on this matter.

 

Best regards,

 

Mattias

 

Tags (1)
10 REPLIES 10
Message 2 of 11
Anonymous
in reply to: Anonymous

Hi Mattias,

I cannot open your files this week, I am at home 🙂 What version of Inventor?

There are a number of ways to "fire" a ilogic rule after making your parameter change in your external file.

Easiest way is to use the itrigger. If you click on the itrigger icon when you are in your assembly this creates the itrigger() user parameter

in your rule add this to the top

trigger = itrigger()

you could get more creative and use the parameter name for your numbber of components as the trigger

 

You can also look at running the rule based on a event change

 

Message 3 of 11
Anonymous
in reply to: Anonymous

Program version is 2011.

 

I have made some experiments with iTrigger and Trigger Events, but with no success so far. iTrigger seems to be a tool for manual launch of rules, but in this case I need the rules to launch automatically. Adding iTrigger only made the difference that I had to manually press the iTrigger button instead of manually run the rule.

 

Event Triggers doesn't seem to make any difference, mostly because the listed events are not very applicable. The event "Any model parameter change" maybe should do the job, but it doesn't when I try it.

 

Please note that the attached files in message 1 above are just a simplified example. In reality I have a structure with subassemblies and a total of about 1500 parts. The structure comtains at least 20 subassemblies with patterns that I really don't want to have to open and update manually, one by one.

 

 

Message 4 of 11
Anonymous
in reply to: Anonymous

I don't think you need any iLogic in the skeleton part file, you can just place it all in the rule at assembly level and use iLogic to reach into the skeleton part file.

 

see the attached files (Inventor 2010 format) for an example.

 

Here is the iLogic rule (placed in the assembly)

Len1 is a User parameter in the assembly

Length is the skeleton part parameter

 

trigger = iTrigger0
Len1 = InputBox("Enter Length", "Length Input", Len1)
Parameter("Skeleton:1", "Length") = Len1
iLogicVb.UpdateWhenDone = True

pattern ilogic.png 

 

the trigger will run the rule in the assembly (for testing), which displays an input box, that sets the Length in the assembly and the part at the same time.

 

Message 5 of 11
Anonymous
in reply to: Anonymous

Thanks for the tip, but unfortunately I think I need another solution. In this case I need to be able to edit the value in the skeleton part file and then have the assembly updating itself automatically.

 

The company I work for produce prefabricated bathrooms. In this case it is a system for restoration of old bathrooms. Our product can be described as a new bathroom built inside the old one, using prefabricated wall panels. The wall panels are sandwich constructions covered with regular bathroom stone tiles. 

 

I am currently working with an automated inventor model for this restoration system. Old bathrooms come in all sizes and the automated inventor model is supposed to quickly produce information about cut lengths, material volumes, and so on, based on the dimensions of the old room. The idea is to have only one file (the "skeleton.ipt") where the project engineer can input the data from the old room. The file "skeleton.ipt" is present within every part and assembly in the whole structure, in assemblies it is always the first part and i parts it is derived as the first feature. This procedure makes it possible to update all sizes in an entire bathroom assembly by just editing a few parameters in one single file. That is why the file is called "skeleton".

 

The model works great, apart from the fact that I still have to manually engage some of the rules, especially those concerning number of occurrences in assembly patterns.

 

So thanks a million for the tip, but I really need to be able to update the assembly through the skeleton part file. The other way around does not work, unfortunately.

 

Message 6 of 11
Anonymous
in reply to: Anonymous

I'll have to defer to someone else on this one. Updating the assembly from the part is beyond my abilities with iLogic. Hopefully someone else can come up with a solution. Best of luck.

Message 7 of 11
MjDeck
in reply to: Anonymous

You can make the rule run automatically by linking in the required parameters from the skeleton part into the assembly.  Maybe you've done this before.  If not, here's a step-by-step:

- In the assembly, start the Parameters command

- Click the Link button (in the lower left corner)

- Browse to your Skeleton.ipt  (Files of type: Inventor files)

- Choose the parameters to link in.  (see the screenshot)

 

Now the part parameters are available directly in the assembly.  You can change your rule to:

 

Spacing = Increment
Qantity = Number_of_instances
iLogicVb.UpdateWhenDone = True

 


Mike Deck
Software Developer
Autodesk, Inc.

Message 8 of 11
Anonymous
in reply to: MjDeck

Hello Mike,

 

I tried linking the required parameters the way you suggested and it works great!

 

Thanks a million!

 

 

Message 9 of 11
Anonymous
in reply to: Anonymous

doh!

seems so obvious now! Smiley Surprised

Message 10 of 11
cgoKADUW
in reply to: MjDeck

Hi,

 

I have a similar situation but with an IPT. The model doesn't update after running the rule. Any suggestions?

if I change height, length or width. I have to reopen the rule and run it otherwise the model shows both styles.

If I leave the same dimension it updates fine.

I already tried Document. update and nothing. 

 

cgoKADUW_0-1612381923883.png     

cgoKADUW_2-1612383048475.png

 

cgoKADUW_1-1612382023877.png

 

 

Message 11 of 11
johnsonshiue
in reply to: Anonymous

Hi! I suspect either a sketch becomes sick due to drastic change in parameter values. Or, there are multiple dependencies that an additional update is required. If you use Manage -> Rebuild All, does it update then?

Please share the example here. There should be a logical reason to explain the behavior.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer

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

Post to forums  

Autodesk Design & Make Report