MLSolidWorksDrwDoc implements the IDrawingDoc interface of SolidWorks. More...
#include <+SolidWorks/MLSolidWorksDrwDoc.h>
Public Member Functions | |
function | MLSolidWorksDrwDoc (in rawPointer) |
Class constructor of MLSolidWorksDrwDoc. | |
function | Close (in obj) |
Gets the Mass Moment of Inertia about the CG in. | |
function | GetMomentOfInertiaAboutCG (in obj) |
Gets the Mass Moment of Inertia about the CG in the documents frame of reference. | |
function | WindowRedraw (in obj) |
Redraws the current window. | |
function | RebuildAll (in obj) |
Rebuilds the entire SolidWorks feature tree and updates the graphics area. | |
function | ForceRebuildAll (in obj) |
Rebuilds the entire SolidWorks feature tree and updates the graphics area even if there are errors. | |
function | IncrementalRebuild (in obj) |
Rebuilds only those features in the model that need to be rebuilt. | |
function | ClearSelection (in obj, in isAll) |
Clears the selection list. | |
function | Parameter (in obj, in parameterName) |
Gets a parameter like Boss Extrude value or a Dimension by giving a. | |
function | SaveAs (in obj, in newName, in isSaveAsCopy, in isSilentSave) |
Performs a SaveAs operation on the active document. | |
function | SelectGeom (in obj, in X, in Y, in Z) |
Impliments a simple select method that takes a 3D point and simulates a mouse click for selecting an entity in the graphics area. | |
function | SelectGeomByType (in obj, in SelID, in SelParam, in X, in Y, in Z) |
Impliments a simple select method that takes the name of. | |
function | MultiSelect (in obj, in SelectData) |
Selects multiple entities given their information in a cell array. | |
function | GetMotionStudyManager (in obj) |
Gets the MotionManager. | |
function | GetFEAStudyManager (in obj) |
Gets the Interface to FEAStudyManager. | |
function | SetUserPreferenceDouble (in obj, in UserPref, in UserPrefOption, in Value) |
Sets the use preferences of a model. | |
function | SetMaterialDensity (in obj, in density) |
Sets the material density. | |
function | SetZoomFactor (in obj, in zoomFactor) |
Sets the zoom factor of a model view. | |
function | ZoomToFit (in obj) |
Sets the zoom factor of a model view. | |
function | GetRootComponent (in obj) |
Returns the root Component for the given configuration. | |
Public Attributes | |
Mass | |
Gets the Mass of the model. | |
Density | |
Gets the Density of the model. | |
SurfaceArea | |
Gets the SurfaceArea of the model. | |
Volume | |
Gets the Volume of the model. | |
CG | |
Gets the CG of the model. | |
PrincipleAxesOfInertia | |
Gets the PrincipleAxesOfInertia of the model. | |
PrincipleMomentsOfInertia | |
Gets the PrincipleMomentsOfInertia of the model. | |
ISketchManager | |
Gets the ISketchManager of the model. | |
IFeatureManager | |
Gets the IFeatureManager of the model. | |
ColorValueRed | |
Get or set the Red color value (0 to 1) | |
ColorValueGreen | |
Get or set the Green color value (0 to 1) | |
ColorValueBlue | |
Get or set the Blue color value (0 to 1) | |
Ambient | |
Get or set the Ambient light value (0 to 1) | |
Diffuse | |
Get or set the Diffuse value (0 to 1) | |
Specular | |
Get or set the Specular value (0 to 1) | |
Shininess | |
Get or set the Shininess value (0 to 1) | |
Transparency | |
Get or set the Transparency value (0 to 1) | |
Emissivity | |
Get or set the Emissivity value (0 to 1) | |
m_CADDoc |
MLSolidWorksDrwDoc implements the IDrawingDoc interface of SolidWorks.
The MLSolidWorksDrwDoc interface allows access to functions that perform drawing operations.
For more information please refer to the SolidWorks API documentation.
function MLSolidWorksDrwDoc | ( | in | rawPointer ) |
Class constructor of MLSolidWorksDrwDoc.
function ClearSelection | ( | in | obj, |
in | isAll | ||
) | [inherited] |
Clears the selection list.
obj | is the instance if the object calling and is implicit. |
isAll | True clears the entire existing selection list.
|
function Close | ( | in | obj ) | [inherited] |
Gets the Mass Moment of Inertia about the CG in.
the documents frame of reference.
obj | is the instance if the object calling and is implicit. |
function ForceRebuildAll | ( | in | obj ) | [inherited] |
Rebuilds the entire SolidWorks feature tree and updates the graphics area even if there are errors.
obj | is the instance if the object calling and is implicit. |
This method can be expensive for large SolidWorks models. Use IncrementalRebuild() if possible.
function GetFEAStudyManager | ( | in | obj ) | [inherited] |
Gets the Interface to FEAStudyManager.
obj | is the instance if the object calling and is implicit. |
IFEAStudyManager | Returns the MLSolidWorksFEAStudyManager object. |
Use the MLSolidWorksFEAStudyManager object to access SolidWorks Simulation
You must have a SolidWorks Premimum license to use this feature.
Also you must have SolidWorks Simulation loaded before you call this API method. You can load SolidWorks Simulation from the SolidWorks menu Tools->Add-Ins and then check the box next to SolidWorks Simulation.
function GetMomentOfInertiaAboutCG | ( | in | obj ) | [inherited] |
Gets the Mass Moment of Inertia about the CG in the documents frame of reference.
obj | is the instance if the object calling and is implicit. |
inertiaTensor | This is a 3x3 array of doubles |
function GetMotionStudyManager | ( | in | obj ) | [inherited] |
Gets the MotionManager.
obj | is the instance if the object calling and is implicit. |
IMotionStudyManager | Returns the MLSolidWorksMotionStudyManager object. |
Use the MLSolidWorksMotionStudyManager object to access the Motion Study properties and methods.
function GetRootComponent | ( | in | obj ) | [inherited] |
Returns the root Component for the given configuration.
obj | is the instance if the object calling and is implicit |
The | root component of the current configuration. Use this to start tree traversals |
function IncrementalRebuild | ( | in | obj ) | [inherited] |
Rebuilds only those features in the model that need to be rebuilt.
obj | is the instance if the object calling and is implicit. |
function MultiSelect | ( | in | obj, |
in | SelectData | ||
) | [inherited] |
Selects multiple entities given their information in a cell array.
obj | is the instance if the object calling and is implicit. |
SelectData | SelectData is defined as: |
selectData{1} = {'EntityName' 'FACE' X Y Z}
status | Error if any. |
function Parameter | ( | in | obj, |
in | parameterName | ||
) | [inherited] |
Gets a parameter like Boss Extrude value or a Dimension by giving a.
name.
obj | is the instance if the object calling and is implicit. |
parameterName | Name of parameter (for example, "D1@Base-Revolve") |
selectedParam | Return value is object if type MLSolidWorksDimension. |
The StringIn argument must be the fully qualified dimension name (for example, "D1@Base-Extrude") for this method. However, the full dimension name is not needed if you use IFeature::IParameter or IFeature::Parameter.
Some characters are recognized as special characters. The use of these characters in names or parts or features can cause this method to fail to return a dimension. These special characters are not recognized in names of parts or features:
For more information please refer to the SolidWorks API documentation.
function RebuildAll | ( | in | obj ) | [inherited] |
Rebuilds the entire SolidWorks feature tree and updates the graphics area.
obj | is the instance if the object calling and is implicit. |
This method can be expensive for large SolidWorks models. Use IncrementalRebuild() if possible.
function SaveAs | ( | in | obj, |
in | newName, | ||
in | isSaveAsCopy, | ||
in | isSilentSave | ||
) | [inherited] |
Performs a SaveAs operation on the active document.
obj | is the instance if the object calling and is implicit. |
newName | The new name of the document Example: `C:.SLDPRT` |
isSaveAsCopy | Save as a copy so that references from other SolidWorks files does not carry over. |
isSilentSave | Avoid all modal dialogs. |
status | Error if any. |
function SelectGeom | ( | in | obj, |
in | X, | ||
in | Y, | ||
in | Z | ||
) | [inherited] |
Impliments a simple select method that takes a 3D point and simulates a mouse click for selecting an entity in the graphics area.
obj | is the instance if the object calling and is implicit. |
X | The X location of the point where you want to perform a mouse click |
Y | The Y location of the point where you want to perform a mouse click |
Z | The Z location of the point where you want to perform a mouse click |
status | Error if any. |
function SelectGeomByType | ( | in | obj, |
in | SelID, | ||
in | SelParam, | ||
in | X, | ||
in | Y, | ||
in | Z | ||
) | [inherited] |
Impliments a simple select method that takes the name of.
of the entity (like `Top Plane`) and the geometry type to select it.
obj | is the instance if the object calling and is implicit. |
SelID | The name of the eitity to select (like `Top Plane`) |
SelParam | The type of eitity (like `PLANE`) |
X | The X location of the point where you want to perform a mouse click |
Y | The Y location of the point where you want to perform a mouse click |
Z | The Z location of the point where you want to perform a mouse click |
status | Returns the error if any. |
While selecting an entity like a plane where you specify the SelID and the SelParam, the X ,Y and Z can be set to 0,0,0.
function SetMaterialDensity | ( | in | obj, |
in | density | ||
) | [inherited] |
Sets the material density.
obj | is the instance if the object calling and is implicit. |
density | Value of density |
True | if the user preference is set, false if not |
function SetUserPreferenceDouble | ( | in | obj, |
in | UserPref, | ||
in | UserPrefOption, | ||
in | Value | ||
) | [inherited] |
Sets the use preferences of a model.
obj | is the instance if the object calling and is implicit. |
UserPref | User preference as defined in CADLab.SolidWorks.MLSWConst.swUserPreferenceDoubleValue |
UserPrefOption | User-preference option for customizing annotation and dimension drafting standards and as defined in swUserPreferenceOption_e; if not needed, then specify CADLab.SolidWorks.MLSWConst.swDetailingNoOptionSpecified |
Value | Value to assign to the user preference specified in UserPref |
True | if the user preference is set, false if not |
function SetZoomFactor | ( | in | obj, |
in | zoomFactor | ||
) | [inherited] |
Sets the zoom factor of a model view.
obj | is the instance if the object calling and is implicit. |
zoomFactor | Value of the zoom. The zoom factor should be in the range 0.0 < factor < 2.0. For factor greater than 1, the model view is zoomed in, for factor less than 1 the model view is zoomed out. |
True | if the user preference is set, false if not |
function WindowRedraw | ( | in | obj ) | [inherited] |
Redraws the current window.
obj | is the instance if the object calling and is implicit. |
The current window includes the FeatureManager design tree view and the graphic view or views if you are using the window splitter.
function ZoomToFit | ( | in | obj ) | [inherited] |
Sets the zoom factor of a model view.
obj | is the instance if the object calling and is implicit |
True | if the user preference is set, false if not |
Ambient [inherited] |
Get or set the Ambient light value (0 to 1)
CG [inherited] |
Gets the CG of the model.
This is a read-only property.
ColorValueBlue [inherited] |
Get or set the Blue color value (0 to 1)
ColorValueGreen [inherited] |
Get or set the Green color value (0 to 1)
ColorValueRed [inherited] |
Get or set the Red color value (0 to 1)
Density [inherited] |
Gets the Density of the model.
This is a read-only property.
Diffuse [inherited] |
Get or set the Diffuse value (0 to 1)
Emissivity [inherited] |
Get or set the Emissivity value (0 to 1)
IFeatureManager [inherited] |
Gets the IFeatureManager of the model.
The Featuremanager can be used to add or modify a feature. Most items on the SolidWorks design tree is a feature.
For more information please refer to the SolidWorks API documentation.
This is a read-only property.
ISketchManager [inherited] |
Gets the ISketchManager of the model.
The Sketch manager can be used to add a new sketch ot modify an existing sketch.
For more information please refer to the SolidWorks API documentation.
This is a read-only property.
m_CADDoc [inherited] |
Mass [inherited] |
Gets the Mass of the model.
This is a read-only property.
PrincipleAxesOfInertia [inherited] |
Gets the PrincipleAxesOfInertia of the model.
This is a read-only property.
PrincipleMomentsOfInertia [inherited] |
Gets the PrincipleMomentsOfInertia of the model.
This is a read-only property.
Shininess [inherited] |
Get or set the Shininess value (0 to 1)
Specular [inherited] |
Get or set the Specular value (0 to 1)
SurfaceArea [inherited] |
Gets the SurfaceArea of the model.
This is a read-only property.
Transparency [inherited] |
Get or set the Transparency value (0 to 1)
Volume [inherited] |
Gets the Volume of the model.
This is a read-only property.