Subject : How to access a system command ?


1) Open a Part document
2)launch the Workshop Exposition command. You find it in the XCAA2 catagory of the Tools/Customize command
2) select one or several entity ( for you the CATMmrPartWks )
3) enter a path directory
4) push the print button

In the directory you will find a CATMmrPartWks.txt where the headers and the starter are given.

Retrieve the Sketcher name:
Title= Sketcher
Id = CATMmrSketchHeaderHdr
DLL = CATSkuBase
Arg =
State Initial = 1
State Current = 1

In your workbench or addin use the CATMmrSketchHeaderHdr identifier

caution about the reusage of a DS header:

if you reuse an header from an another workbench, when your own workbench will be launched, the reused header will be unknown, so all the workbenches will be loaded. You lost the benefit of the partial loading.
So at first reuse a DS header from the workshop. If you have need of a workbench header, create in your entity a new header with the name of the command, its library name that you find in the txt file.

the Workshop Exposition command is available for all the documents ( in fact the UI active object)


I give you my sample :

CATCmdContainer* CAAEMmrCombinedCurveAdn::CreateToolbars()

NewAccess ( CATCmdContainer , pMyTlb ,MyTlb );

NewAccess ( CATCmdStarter , pMyStr , MyStr );
SetAccessCommand ( pMyStr , “CATMmrSketchHeaderHdr” );
SetAccessChild ( pMyTlb , pMyStr );

AddToolbarView ( pMyTlb , 1 , Right );
return pMyTlb ;

and it works.
But Perhaps your application (workbench/addin) is not into the Part Workshop ?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s