Click or drag to resize

ModelerExCreateCylinder Method

Creates the cylindrical body

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 CreateCylinder(
	this IModeler modeler,
	Point center,
	Vector axis,
	double radius,
	double height
)

Parameters

modeler
Type: IModeler
Pointer to modeler
center
Type: CodeStack.SwEx.MacroFeature.DataPoint
Center coordinate of cylinder in meters
axis
Type: CodeStack.SwEx.MacroFeature.DataVector
Cylinder axis
radius
Type: SystemDouble
Cylinder radius in meters
height
Type: SystemDouble
Cylinder height

Return Value

Type: IBody2
Cylindrical 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::CreateBodyFromCyl 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 cylinder entities will become dangling upon rebuild
See Also