Click or drag to resize

ModelerExCreateBox Method (IModeler, Point, 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,
	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
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: IBody2
Pointer 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