cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

VB API read Assembly structure without triggering regenerate

HR_8506783
3-Visitor

VB API read Assembly structure without triggering regenerate

I have an assembly with over 1000 components, and I must read the entire structure  (all level sub-assemblies and parts).  But then, during the read, the Creo runs generate at every level.  The overall structure read goes beyond 15 minutes.   And there are cases I have to parse Assemblies beyond 1000 components, which makes it impractical to use the custom program.

 

Is there a way to disable generate programmatically during the assembly read? 

 

Example: 

subComponents = currentComponent.ListFeaturesByType (False,                               

                                                                                                           EpfcFeatureType.EpfcFEATTYPE_COMPONENT)
If subComponents IsNot Nothing Then
      For Each subCompItem In subComponents
             ReadAssemblyStructure(creoSession, currentLevel, assemblyObj, childNode, 
      Next
End If

 

 

 

 

 

3 REPLIES 3

Just a stab in the dark as I haven't done any VB code with Creo... but I have done some scripting with SolidWorks (and they share a lot of similarities).

In SolidWorks, there were methods for getting an assembly's dependencies without even opening the file. Might be something worth investigating. I think the limitation is that you can get dependencies only, not an actual structure with quantities. Not sure if that would meet your requirements, but it would be much, much faster to run if the assemblies don't need to be opened.

Good hint.

It is possible to open symbolic simprep of the assy very fast with out regeneration.

RPN
17-Peridot
17-Peridot
(To:HR_8506783)

As far I know there is no need to regen if you get the structure, because it is in memory. But if you get a member make sure to check the status. Only active components should be parsed, ignore for example suppressed once. If you don’t do this you may force to open components or family table member. Your code example does not show this, as far I understand VB.

Top Tags