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

Toolkit Functions for Assemblies

Highlighted
Emerald II

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.

Tags (1)
6 REPLIES 6
Highlighted

Re: Toolkit Functions for Assemblies

I've no experiences with this, but it might be interesting for you:

https://www.ptc.com/-/media/Files/PDFs/CAD/GRANITE_Interoperability_Kernel.pdf?la=en&hash=A9F78D0CA4...

Highlighted

Re: Toolkit Functions for Assemblies

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?

 

Highlighted

Re: Toolkit Functions for Assemblies

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...)

Highlighted

Re: Toolkit Functions for Assemblies

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

Highlighted

Re: Toolkit Functions for Assemblies

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.

 

 

Highlighted

Re: Toolkit Functions for Assemblies

 

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

Announcements