Hello everyone,
I've got two really simple questions here:
1. How do I make a temporary body unselectable?
2. How do I make a temporary body not appear in my "tree" of components in solidworks? (the big list on the left side)
I'm currently using this code:
//-----------------------------------------------------------------------------------------------------------------------
ModelDoc2 swModel;
Modeler swModeler;
Body2 swBody;
Feature swFeat;
PartDoc swPart= default(PartDoc);
double[] dblData;
swModel = (ModelDoc2)swApp.ActiveDoc;
swModeler = (Modeler)swApp.GetModeler();
dblData = new double[9];
// cone X Y Z Face Center
dblData[0] = 0;
dblData[1] = 0.3;
dblData[2] = 0;
// cone X Y Z Axis (rotation)
dblData[3] = 0;
dblData[4] = 0;
dblData[5] = 1;
// cone Base Radius , cone Top Radius, cone Height
dblData[6] = 0.2;
dblData[7] = 0;
dblData[8] = 0.3;
swBody = swModeler.CreateBodyFromCone(dblData);
swPart = (PartDoc)swModel;
swFeat = swPart.CreateFeatureFromBody3(swBody, false , 0);
//-----------------------------------------------------------------------------------------------------------------------
I tried looking for some info in the API HELP and on the net but couldn't find anything related.
I'd appreciate any help, thanks in advance!
-Rumen
SolidworksApi macros