拉到Toolbar里面去,也是会消失。代码如下:
//TIE or TIEchain definitions
#include "TIE_CATIDrwAddin.h"
TIE_CATIDrwAddin(CoordinateGrid);
//Methods implementation
void CoordinateGrid::CreateCommands(void)
{
// Declare the command header
CommandHeader( "CoordinateGridCmd", "CoordinateGrid", "CoordinateGridCmd", (void **)NULL );
return;
}
CATCmdContainer * CoordinateGrid::CreateToolbars(void)
{
// Create the Toolbar
NewAccess( CATCmdContainer, pDrwCmdSet, DrwCmdSet );
// Create the Coordinate-Grid Command
NewAccess( CATCmdStarter, pCoorGrid, CoorGrid );
SetAccessCommand( pCoorGrid, "CoordinateGridCmd" );
SetAccessChild( pDrwCmdSet, pCoorGrid );
AddToolbarView( pDrwCmdSet, 1, UnDock );
return pDrwCmdSet;
} |