| ModelerExCreateBox Method (IModeler, Point, Vector, Vector, Double, Double, Double) |
Creates the box solid geometry
Namespace:
SolidWorks.Interop.sldworks
Assembly:
CodeStack.SwEx.MacroFeature (in CodeStack.SwEx.MacroFeature.dll) Version: 0.5.3.0 (0.5.3.0)
Syntax public static IBody2 CreateBox(
this IModeler modeler,
Point center,
Vector dir,
ref Vector refDir,
double width,
double length,
double height
)
<ExtensionAttribute>
Public Shared Function CreateBox (
modeler As IModeler,
center As Point,
dir As Vector,
ByRef refDir As Vector,
width As Double,
length As Double,
height As Double
) As IBody2
public:
[ExtensionAttribute]
static IBody2^ CreateBox(
IModeler^ modeler,
Point^ center,
Vector^ dir,
Vector^% refDir,
double width,
double length,
double height
)
Parameters
- modeler
- Type: IModeler
Pointer to modeler - center
- Type: CodeStack.SwEx.MacroFeature.DataPoint
Center coordinate of the box in meters - dir
- Type: CodeStack.SwEx.MacroFeature.DataVector
Direction of the box - refDir
- Type: CodeStack.SwEx.MacroFeature.DataVector
Input or output direction of ref axis which corresponds to X. Specify null to auto calculate - width
- Type: SystemDouble
Width of the box in meters - length
- Type: SystemDouble
Length of the box in meters - height
- Type: SystemDouble
Height of the box in meters. This is a dimension parallel to dir
Return Value
Type:
IBody2Pointer to a temp body
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IModeler. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Remarks Use this method instead of built-in
IModeler::CreateBodyFromBox
If you need to preserve entity ids as the body generated using the built-in method won't allow to set user id,
which means any reference geometry generated in relation to box entities will become dangling upon rebuild
See Also