Public Member Functions | Public Attributes

MLSolidWorksDrwDoc Class Reference

MLSolidWorksDrwDoc implements the IDrawingDoc interface of SolidWorks. More...

#include <+SolidWorks/MLSolidWorksDrwDoc.h>

Inheritance diagram for MLSolidWorksDrwDoc:
Inheritance graph
[legend]
Collaboration diagram for MLSolidWorksDrwDoc:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

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.


Constructor & Destructor Documentation

function MLSolidWorksDrwDoc ( in  rawPointer )

Class constructor of MLSolidWorksDrwDoc.


Member Function Documentation

function ClearSelection ( in  obj,
in  isAll 
) [inherited]

Clears the selection list.

Parameters:
objis the instance if the object calling and is implicit.
isAllTrue clears the entire existing selection list.

  • false clears only the items in the active selection list. - false will only work if the current PropertyManager page contains a selection list; otherwise, this method clears all selections.
function Close ( in  obj ) [inherited]

Gets the Mass Moment of Inertia about the CG in.

the documents frame of reference.

Parameters:
objis 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.

Parameters:
objis the instance if the object calling and is implicit.
Remarks

This method can be expensive for large SolidWorks models. Use IncrementalRebuild() if possible.

function GetFEAStudyManager ( in  obj ) [inherited]

Gets the Interface to FEAStudyManager.

Parameters:
objis the instance if the object calling and is implicit.
Return values:
IFEAStudyManagerReturns the MLSolidWorksFEAStudyManager object.
Remarks

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.

Parameters:
objis the instance if the object calling and is implicit.
Return values:
inertiaTensorThis is a 3x3 array of doubles
function GetMotionStudyManager ( in  obj ) [inherited]

Gets the MotionManager.

Parameters:
objis the instance if the object calling and is implicit.
Return values:
IMotionStudyManagerReturns the MLSolidWorksMotionStudyManager object.
Remarks

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.

Parameters:
objis the instance if the object calling and is implicit
Return values:
Theroot 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.

Parameters:
objis 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.

Parameters:
objis the instance if the object calling and is implicit.
SelectDataSelectData is defined as:

selectData{1} = {'EntityName' 'FACE' X Y Z}

Return values:
statusError if any.
function Parameter ( in  obj,
in  parameterName 
) [inherited]

Gets a parameter like Boss Extrude value or a Dimension by giving a.

name.

Parameters:
objis the instance if the object calling and is implicit.
parameterNameName of parameter (for example, "D1@Base-Revolve")
Return values:
selectedParamReturn value is object if type MLSolidWorksDimension.
Remarks

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:

  • at sign ( @ )
  • period ( . )
  • backslash ( / )

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.

Parameters:
objis the instance if the object calling and is implicit.
Remarks

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.

Parameters:
objis the instance if the object calling and is implicit.
newNameThe new name of the document Example: `C:.SLDPRT`
isSaveAsCopySave as a copy so that references from other SolidWorks files does not carry over.
isSilentSaveAvoid all modal dialogs.
Return values:
statusError 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.

Parameters:
objis the instance if the object calling and is implicit.
XThe X location of the point where you want to perform a mouse click
YThe Y location of the point where you want to perform a mouse click
ZThe Z location of the point where you want to perform a mouse click
Return values:
statusError if any.
Remarks
  • The easiest way to get the coordinates is to record a macro in SolidWorks and use the points from it.
  • To ensure robustness of your selection please pick a point that is somewhere in the middle of the object you want to select. For example pick a point that is in the middle of a plane.
  • This function may not be suited for selecting points or vertices.
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.

Parameters:
objis the instance if the object calling and is implicit.
SelIDThe name of the eitity to select (like `Top Plane`)
SelParamThe type of eitity (like `PLANE`)
XThe X location of the point where you want to perform a mouse click
YThe Y location of the point where you want to perform a mouse click
ZThe Z location of the point where you want to perform a mouse click
Return values:
statusReturns the error if any.
Remarks

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.

Parameters:
objis the instance if the object calling and is implicit.
densityValue of density
Return values:
Trueif 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.

Parameters:
objis the instance if the object calling and is implicit.
UserPrefUser preference as defined in CADLab.SolidWorks.MLSWConst.swUserPreferenceDoubleValue
UserPrefOptionUser-preference option for customizing annotation and dimension drafting standards and as defined in swUserPreferenceOption_e; if not needed, then specify CADLab.SolidWorks.MLSWConst.swDetailingNoOptionSpecified
ValueValue to assign to the user preference specified in UserPref
Return values:
Trueif the user preference is set, false if not
function SetZoomFactor ( in  obj,
in  zoomFactor 
) [inherited]

Sets the zoom factor of a model view.

Parameters:
objis the instance if the object calling and is implicit.
zoomFactorValue 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.
Return values:
Trueif the user preference is set, false if not
function WindowRedraw ( in  obj ) [inherited]

Redraws the current window.

Parameters:
objis the instance if the object calling and is implicit.
Remarks

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.

Parameters:
objis the instance if the object calling and is implicit
Return values:
Trueif the user preference is set, false if not

Member Data Documentation

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.

Gets the PrincipleAxesOfInertia of the model.

This is a read-only property.

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.


The documentation for this class was generated from the following file: