InsertShape Method (ISketchManager)

InsertShape Method (ISketchManager) | Send Feedback
See Also Example

Shape[out]
  Shape

Name
  Name of the shape to insert (see Remarks)

PositionX
  x coordinate of the point where to insert the shape

PositionY
  y coordinate of the point where to insert the shape

PositionZ
  z coordinate of the point where to insert the shape

Height
  Height of the shape

Rotation
  Angle by which to rotate the shape

Inserts a shape.

# Syntax

Visual Basic |
--- | ---
    Function InsertShape( _
       ByVal Name As System.String, _
       ByVal PositionX As System.Double, _
       ByVal PositionY As System.Double, _
       ByVal PositionZ As System.Double, _
       ByVal Height As System.Double, _
       ByVal Rotation As System.Double _
    ) As Shape

C# |
--- | ---
    Shape InsertShape(
       System.string Name,
       System.double PositionX,
       System.double PositionY,
       System.double PositionZ,
       System.double Height,
       System.double Rotation
    )

JavaScript |
--- | ---
    InsertShape(
       Name : String,
       PositionX : Number,
       PositionY : Number,
       PositionZ : Number,
       Height : Number,
       Rotation : Number
    ) : dsShape

COM native C++ |
--- | ---
    HRESULT InsertShape(
       BSTR Name,
       DOUBLE PositionX,
       DOUBLE PositionY,
       DOUBLE PositionZ,
       DOUBLE Height,
       DOUBLE Rotation,
       IShape** Shape
    )

C++ |
--- | ---
    DSRESULT InsertShape(
       const dsString& Name,
       double PositionX,
       double PositionY,
       double PositionZ,
       double Height,
       double Rotation,
       dsShape** Shape
    )

#### Parameters

Name
  Name of the shape to insert (see Remarks)
PositionX
  x coordinate of the point where to insert the shape
PositionY
  y coordinate of the point where to insert the shape
PositionZ
  z coordinate of the point where to insert the shape
Height
  Height of the shape
Rotation
  Angle by which to rotate the shape
Shape[out] or Return Value
  Shape

# Example

Insert Shapes (C#)
Insert Shapes (VB.NET)
Insert Shapes (VBA)
Insert Shapes (JavaScript)

# Remarks

A shape is stored as a reference to a font and to a character within that font. Essentially a shape is a single character of a compiled shape (SHX) font.

You must load the shape file before a shape in that file can be used in a drawing. Call IShapeManager::GetAvailableShapes to get the names of shapes loaded in the drawing.

# See Also

####

ISketchManager Interface
ISketchManager Members
IShapeManager::GetAvailableShapes Method ()

# Availability

DraftSight V1R4.0