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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Toolkit Functions for Assemblies

TomU
23-Emerald IV

Toolkit Functions for Assemblies

Not a Toolkit developer, just curious about something...

 

Are there any Toolkit commands that would allow analyzing a Creo Parametric assembly file without actually retrieving into session the entire assembly and all of its dependents?  Somehow the Creo View Adapters are able to do this today when publishing 'positioning assemblies'.  They open the assembly file, extract a list of components and their relative positions, and also extract all of the assembly parameters.  All of this happens without ever retrieving or opening any of the assembly's required dependents.

 

Is it possible to do this same thing with Toolkit, or is this some hidden capability that only PTC has?  I'd like to be able to interrogate assembly files (read all parameters, get list of components, etc.) without having to retrieve or load any of the dependents components.

 

Thanks.

6 REPLIES 6
FabianWolf
12-Amethyst
(To:TomU)

GabrielZaha
12-Amethyst
(To:TomU)

As far as I know it is not possible to get information's about an assembly without retrieving first the assembly into memory.

I'm not sure how Creo View Adapters are working but could it be possible is creating a hidden(batch) session?

 

TomU
23-Emerald IV
(To:GabrielZaha)

Loading the assembly into session is fine.  It's retrieving and loading all the dependent objects that I'm trying to avoid.  It sounds like this may be possible with a special DLL.  (I have someone else checking into this...)

DavidBigelow
17-Peridot
(To:TomU)

Could you load it as a simplified rep - to keep the speed up?

remy
21-Topaz I
(To:TomU)

As a rule of thumb, when inquiring Toolkit, know that it is an API that replicates the UI. Not more and sometimes a bit less. Making the function actually available is additional delivery work too (customers need to understand that).

 

Consequently if it is unavailable from the UI, then it is unlikely with Toolkit.

 

 

Eike_Hauptmann
13-Aquamarine
(To:TomU)

 

You can use the std. Simplified Representations.

OTK:

pfcBaseSession::RetrieveGraphicsSimpRep

pfcBaseSession::RetrieveSymbolicSimpRep

pfcBaseSession::RetrieveGeomSimpRep

pfcBaseSession::RetrievePartSimpRep

wfcWSession::RetrieveLightweightGraphicsSimpRep

wfcWSession::RetrieveDefaultEnvelopeSimprep

wfcWSession::RetrieveSimpRep

 

or retrieve (and open) it by a mapkey:

If you do the load to the session by a macro it is possible to load it without subassembly's.

 

File -> Open -> <Choose assembly> -> Open Subset -> Open

 

If you retrieve this subset you can only read level 1 of the modeltree, the rest isn't loaded.

 

ProMacroLoad();

ProMacroExecute();

 

After that search it from the files in session.

 

Be prepared that many things can't be calculated right (Volume, Mass, ...) inside these.

 

-------

 

As far as I know there is the possibility by the granite kernel as also a hacky solution by using a Creo DLL direct (I don't know how, have just seen this). I think the best solution is to do it by Toolkit or to push it to another server so it didn't block your time (you can use automations like Creoson for this) but it matters on the things you want to do with it.

 

Br,

Eike

Top Tags