Public Member Functions | Public Attributes

MLSolidWorksComponent Class Reference

Impliments the ICComponent2 interface of the SolidWorks API. More...

#include <+SolidWorks/MLSolidWorksComponent.h>

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

List of all members.

Public Member Functions

function MLSolidWorksComponent (in rawISMgrPointer)
function IsFixed (in obj)
 Returns whether the component is fixed or floating.
function IsRoot (in obj)
 Returns whether the component is root or not.
function IsSuppressed (in obj)
 Returns whether the component is Suppressed or not.
function GetChildren (in obj)
 Returns the children of this component.
function GetTransform (in obj)
 Returns the 4x4 transform of a named component in a given assembly.
function SetTransform (in obj, in Transform4x4)
 Sets the 4x4 transform of a named component in a given assembly.
function GetModelDoc (in obj)
 Gets the corresponding CADLab.SolidWorks.MLSolidWorksDoc interface.
function GetChildrenCount (in obj)
 Gets the number of children this component has.

Public Attributes

 Name
 Gets or Sets the SolidWorks component name.
 Visible
 Gets or Sets the SolidWorks component visibility.
 m_CADRawPointer

Detailed Description

Impliments the ICComponent2 interface of the SolidWorks API.


Constructor & Destructor Documentation

function MLSolidWorksComponent ( in  rawISMgrPointer )

Member Function Documentation

function GetChildren ( in  obj )

Returns the children of this component.

Parameters:
objis the instance if the object calling and is implicit
Return values:
childrenArray of child components
function GetChildrenCount ( in  obj )

Gets the number of children this component has.

This is not a recursive function and returns only the immediate children.

Parameters:
objis the instance if the object calling and is implicit.
numChildren
function GetModelDoc ( in  obj )

Gets the corresponding CADLab.SolidWorks.MLSolidWorksDoc interface.

Parameters:
objis the instance if the object calling and is implicit.
modelDocCADLab.SolidWorks.MLSolidWorksDoc object
Remarks
This method might return NULL if: a component is suppressed or lightweight. the component ID is not loaded into memory by SolidWorks. For more information on lightweight components, see Work With Lightweight Components.

When you use the IModelDoc2 object of a component, you do not have access to whatever uniqueness might exist for this instance of the assembly IComponent2. This occurs because the IModelDoc2 object goes back to the saved part file. By comparison, the IComponent2 object gathers information at the assembly level. This allows IComponent2 objects to recognize assembly-level changes made to a component instance (for example, assembly-level features and material changes).

In addition, the IModelDoc2 object returned from this method represents the last-saved state. If the component part is currently open, then the IModelDoc2 object represents the state of the opened document. For example, if the component part is not open and it was last saved in the default configuration, then IComponent2::GetModelDoc2 returns a IModelDoc2 pointer representing that state.

function GetTransform ( in  obj )

Returns the 4x4 transform of a named component in a given assembly.

Parameters:
objis the instance if the object calling and is implicit.
componentNameComponent name whose transform is requested.
Return values:
retValReturn value is a 4x4 transform
function IsFixed ( in  obj )

Returns whether the component is fixed or floating.

Parameters:
objis the instance if the object calling and is implicit
Return values:
statusFixed or floating (boolean)
function IsRoot ( in  obj )

Returns whether the component is root or not.

Parameters:
objis the instance if the object calling and is implicit
Return values:
statusRoot or not (boolean)
function IsSuppressed ( in  obj )

Returns whether the component is Suppressed or not.

Parameters:
objis the instance if the object calling and is implicit
Return values:
statusSuppressed or not (boolean)
function SetTransform ( in  obj,
in  Transform4x4 
)

Sets the 4x4 transform of a named component in a given assembly.

Parameters:
objis the instance if the object calling and is implicit.
componentNameComponent name whose transform is to be set.
Transform4x4The 4x4 transformation matrix.

Member Data Documentation

m_CADRawPointer [inherited]

Gets or Sets the SolidWorks component name.

The value is a string.

EXAMPLE: val = thisObj.Name; thisObj.Name = 'foobar';

Gets or Sets the SolidWorks component visibility.

The value is a bool.

EXAMPLE: IsVisible = thisObj.Visible; thisObj.Visible = true/false;


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