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 - Excel driven assembly part update taking very long

15 REPLIES 15
Reply
Message 1 of 16
Anonymous
2681 Views, 15 Replies

iLogic - Excel driven assembly part update taking very long

Hello all

 

I have been busy creating templates in Inventor using ilogic for all our standard manufacturing products. I have been busy with this project for almots 8 months now. I went live in the beginning of the year with great success using Vault collaboration.

 

I am currently getting to a point where my products is becoming a bit more complex and updating these assemblies is getting slow ( plus minus 5 -8 min) which decreases productivity. To explain: My engineers enter data into a linked excel spreadsheet, they would then save excel whereafter inventor will update all the parts. In one specific product i have 18 parts with each having 20 simple features for examples holes and slots. But it takes forever to update. Is there a way of speeding this up. And believe me i have some of the best hardware. I just cant believe the process to take to long as the part is only a box shape heating element being maximum 400x400x400mm made out of simple sheat metal parts.

 

I would appreciate some input and assistance.

 

Kind Regards

 

Johan

15 REPLIES 15
Message 2 of 16
swordmaster
in reply to: Anonymous

Johan,

This seems a long time to update your model. Difficult to say exactly where the time is going without examining your model and rules, however maybe you can check these points.

Do you have the excel linked to all your parts? If so this would slow it down. The best way is to link the spreadsheet to the top level assembly and use ilogic to send the appropriate parameter values to each part.

It is possible that you have rules which are firing multiple times again slowing the process. There are a few ways to check which/when rules are firing, one of the easiest is to place a messagebox(temporary) in each rule that will show when the rule is ran

Inventor 2010 Certified Professional
Message 3 of 16
Anonymous
in reply to: swordmaster

Thank you very much for your response, much appreciated.

 

Yes my excel file is linked to all my files. And to explain this easier i have attached a word file as i am a mech engineer and cannot create stories.

 

As you can see from the first image i have an assembly. The assembly has 2 ilogic rules. One for the terminations the other for the clamps. The assembly is made out of 6 different sheat metal plates on each side which is linked to inputs on the excel file. Some of the values are the same for all but some differ as the user can indicate where holes can be what size and position they should have and on what side. As you then also can see from the next pictures i have almost over 300 inputs linked to each and every part in the assembly. And yes i have always wonder is this could be the cause of the the update taking very long. ( please note what i know about ilogic i learned myself) .

 

How would your part parameters be read from the assembly using ilogic?

 

Once again thank you for your help. 

Message 4 of 16
swordmaster
in reply to: Anonymous

Sending the parameter value from the top level assembly to sub components is relatively straightforward. I have attached a pic showing the code.

Steps are

Link the excel to the top level assembly

create a parameter in the sub component. This is the one that will recieve the value from the top level

create the ilogic rule to pass the value

 

 

Inventor 2010 Certified Professional
Message 5 of 16
Anonymous
in reply to: swordmaster

Good evening

 

Thank you for your response.

 

I played around during the day and managed to find to link these parameters through to the parts. But by using this i have another question, some of the parameters are the same across all the parts how would your rule be in ilogic to be able to achieve this, or would this have to be a repetetive operation.

 

Once again thank you for your response.

 

kind Regards

 

 

Message 6 of 16
swordmaster
in reply to: Anonymous

you need a seperate line of code to pass the parameter value to each part

Inventor 2010 Certified Professional
Message 7 of 16
Anonymous
in reply to: swordmaster

Hi Swordmaster

 

Hope you are well.

 

I would like to thank you for your assistance with regards to my problems as per discusison topic. I am currently pulling all the parameters from my Assembly into the parts and is making my update so much quicker. But i am having a problem with the file names. And would like to give you an example:

I have these templates in Vault under a folder called templates, my engineer would copy the appropriate template change all the files names and then check out for modification. He would then make the changes to an excel file and save. But when he moves to the Inventor screen he encounters a problem with the file name.

 

When i created the parameter rule in assembly i referred to the original file name, that has now been changed according to my file numbering system. And thus cannot find the file name as it no longer exists and thus cannot update parameters.

I am sure that there should be a way around this. I would appreciate it if you could assist me with this. Thank you very much.

 

Kind Regards

 

 

Message 8 of 16
swordmaster
in reply to: Anonymous

Hey no problem! To get around this you need to rename the components that will change name in the Inventor browser. For example Part A is assembled to AssemblyB Open AssemblyB in Inventor and find PartA in the Inventor browser. rename this to something meaningful, for instance MyPartA What this does is "stabalizes" the name and your rule will work regardless if you change the file name. So the code would look like Parameter("MyPartA","d0") = 99 Trick is to use the "stabalized" name in your code. Saying all of that, I am surprised this is the only problem you are having after changing file names. Do you not get a host of resolve link errors when opening the assembly??? Bruce Sword Autodesk Inventor 2010 Certified Associate Autodesk Inventor 2010 Certified Professional -------------------------------------------------------------------------- CONFIDENTIALITY NOTICE: The information in this e-mail message, including all replies or forwarded messages connected herewith, is confidential, may be legally privileged, and is intended only for the use of the intended recipient(s). If you, the reader of this message, are not an intended recipient hereof, you are hereby notified that you should not further disseminate, distribute, or forward this e-mail message. If you have received this e-mail message in error, please notify the sender as soon as possible by return e-mail message or by telephone at (601) 425-3151. In addition, please delete the erroneously received message and any reply from your system and any device/media where the message is stored. --------------------------------------------------------------------------
Inventor 2010 Certified Professional
Message 9 of 16
Anonymous
in reply to: swordmaster

Hi Bruce

 

Hope you are well.

 

Thank you very much for your info. I have made the adjustments and works 100%. But speed is once again the concern at the moment. I added all my rules to the Event trigger to run after a parameter change. With the intention that when i save my excel work sheet it updates the paramaters whereafter it will update the .iam But as mentioned it takes some time.

 

You mentioned last time that there is a way of tracking what runs during the update process. How would it be possible for me to look into this.

 

I have had my fair share of problems with my templates. Its seems to me that managed to get my templates working without any real problems.Must be lucky.

 

Once again thank you for all your assistance, much appreciated.

 

Kind Regards

 

Johan

Message 10 of 16
Anonymous
in reply to: Anonymous

Good day Swordmaster

 

Hope you are well.

 

Do you perhaps have any feedback for me regarding my latest post below.

 

I would appreciate your assistance.

 

Kind Regards

 

Johan

Message 11 of 16
swordmaster
in reply to: Anonymous

Johan, I was on vacation last week, I will reply soon Bruce Sword Autodesk Inventor 2010 Certified Associate Autodesk Inventor 2010 Certified Professional -------------------------------------------------------------------------- CONFIDENTIALITY NOTICE: The information in this e-mail message, including all replies or forwarded messages connected herewith, is confidential, may be legally privileged, and is intended only for the use of the intended recipient(s). If you, the reader of this message, are not an intended recipient hereof, you are hereby notified that you should not further disseminate, distribute, or forward this e-mail message. If you have received this e-mail message in error, please notify the sender as soon as possible by return e-mail message or by telephone at (601) 425-3151. In addition, please delete the erroneously received message and any reply from your system and any device/media where the message is stored. --------------------------------------------------------------------------
Inventor 2010 Certified Professional
Message 12 of 16
swordmaster
in reply to: Anonymous

you can the code below to each of the rules you wish to monitor. It will create a text file showing which rules are started and when. You just need to replace the folder  name,path and description

 

oWrite

= System.IO.File.appendtext("enter path to folder here\then folder name\lnow name of log file....log.txt")

oWrite.WriteLine

(TimeString & "enter a description here, at minimum put the rule name \ start rule")

oWrite.Close

()

Inventor 2010 Certified Professional
Message 13 of 16
Anonymous
in reply to: swordmaster

Hi

 

Thank you very much for your reply. Hope you had a good holiday. I must say i would give anything for some time off from work.

I am trying to figure out where i put this rule. Do i generate an seperate rule with this line in it, or do i add this line to every rule which will then write to the same log file.

Apologies, but just want to make sure i understand this fully. I have then also added a pdf document. Perhaps you would be able to identify some error in my though as these updates are taking very long to happen. I would appreciate your response.

 

kind Regards

Johan van Heerden

Message 14 of 16
swordmaster
in reply to: swordmaster

Johan

The code for generating the log file needs to be added to each rule. I would also recommend removing or commenting out these lines once you are happy with your rules and how they execute.

 

Your design process looks fine, however i do have some comments, these are in no particular order.

 

The rules sending the parameters from the assembly to the parts should be at the end of your ilogic tree

I would add event triggers to all rules for example

trigger=iTrigger0

 

I believe the main reason for the process taking too long is that you have the rules for suppressing part features in the assembly.

This is not good practise. I would recommend that you have these rules in the part .

 

Since your excel is linked to the assembly any change to the excel values will prompt Inventor to update the model (if you make the changes in excel after opening the model)

 

Since you are finding that the update button needs to be pressed to update the model i would recommend that you add this line of code to the bottom of each rule

iLogicVb.UpdateWhenDone = True

Inventor 2010 Certified Professional
Message 15 of 16
Anonymous
in reply to: swordmaster

Good day Bruce thank you for your response.

 

I will follow your advise and move the suppression rule to each part rather.

 

I am then trying to understand the rule itself would i add it like below to my rules. Obviously the only thing that will differ would be the rule name.

 

 

 

oWrite= System.IO.File.appendtext("C:\Inventor\Logfiles\Rule_Log.txt")

oWrite.WriteLine(TimeString & "Rule name")

oWrite.Close

()

 

What do you mean with :

The rules sending the parameters from the assembly to the parts should be at the end of your ilogic tree.

 

Should my parameter rules run at the end of all other rules? Would you advise me have 1 rule for all the parameters? or should i split it up as per my previous post?

 

Thank you once again for all your assistance

 

Johan

 

Message 16 of 16
swordmaster
in reply to: Anonymous

Johan, Yes what you have for creating the log file is fine. For the rules sending the parameters to the parts What I mean is that when you open the ilogic tree editor in the assembly these rules should be at the bottom of the tree. I would keep the separate rules, no need to combine Bruce Sword Autodesk Inventor 2010 Certified Associate Autodesk Inventor 2010 Certified Professional -------------------------------------------------------------------------- CONFIDENTIALITY NOTICE: The information in this e-mail message, including all replies or forwarded messages connected herewith, is confidential, may be legally privileged, and is intended only for the use of the intended recipient(s). If you, the reader of this message, are not an intended recipient hereof, you are hereby notified that you should not further disseminate, distribute, or forward this e-mail message. If you have received this e-mail message in error, please notify the sender as soon as possible by return e-mail message or by telephone at (601) 425-3151. In addition, please delete the erroneously received message and any reply from your system and any device/media where the message is stored. --------------------------------------------------------------------------
Inventor 2010 Certified Professional

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

Post to forums  

Autodesk Design & Make Report