- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
I have a VB code that gets an instance of inventor. It creates a new assembly and then starts adding parts to it. The code works fine and is reliable but I am suprised by how slow the process is.. the process is as follows
'psuedo code...
do
myAssembly.ComponentDefinition.Occurrences.Add(my_component_file, my_position) 'add my next occurrence to the assembly
myOccurrence.Transformation = my_position ' move the occurrence to a new position in assembly space.
With myOccurrence.Definition 'go thru the occurrence and change its dimensions
ForEach p In.Parameters
If p.Name = my_parameter_name Then p.Value = my_parameter_value
Next
EndWith
loop until my_last_component
...I notice that the green progress bar is frequently on with messages in the Inventor statusbar such as "Executing update component" and "Executing change component position".
I wonder is Inventor performing many read/write operations which is causing the slow performance? Perhaps it is updating files after each of my 3 operations in the loop... and if so is there a way i can achieve this faster such as delaying read/write until after all three operations have been performed or until all occurrences have been added??
Any tips appreciated.
Thanks.
Dan
(Belfast, Inventor 2013)
Solved! Go to Solution.