InsertAttributeDefinition Method (ISketchManager)

InsertAttributeDefinition Method (ISketchManager) | Send Feedback
See Also

AttributeDefinition[out]
  IAttributeDefinition

Name
  Name of the BlockAttribute

Caption
  Text that displays at the command window during Block insertion

DefaultValue
  Visible component of the BlockAttribute

PositionX
  x coordinate for the insertion point of the BlockAttribute

PositionY
  y coordinate for the insertion point of the BlockAttribute

PositionZ
  z coordinate for the insertion point of the BlockAttribute

TextStyle
  Text style of the BlockAttribute

Justification
  Position and alignment of the BlockAttribute text in relation to the insertion point

Height
  Text size of the BlockAttribute

Rotation
  Insertion angle of the BlockAttribute

Fixed
  True to make the default value of the BlockAttribute a constant value, false to make it a variable value

Hidden
  True to hide the BlockAttribute in Block references, false to show it

Predefined
  True to use the default values, false to request a value

Validate
  True to prompt the user for verification that the BlockAttribute value is correct when inserting a Block, false to not

LockInBlock
  True to lock the BlockAttribute within the Block reference, false to not

PositionBelowLastDefinition
  True to align the current BlockAttribute below the previous one, false to not (see Remarks)

Creates a BlockAttribute definition.

# Syntax

Visual Basic |
--- | ---
    Function InsertAttributeDefinition( _
       ByVal Name As System.String, _
       ByVal Caption As System.String, _
       ByVal DefaultValue As System.String, _
       ByVal PositionX As System.Double, _
       ByVal PositionY As System.Double, _
       ByVal PositionZ As System.Double, _
       ByVal TextStyle As System.String, _
       ByVal Justification As dsTextJustification_e, _
       ByVal Height As System.Double, _
       ByVal Rotation As System.Double, _
       ByVal Fixed As System.Boolean, _
       ByVal Hidden As System.Boolean, _
       ByVal Predefined As System.Boolean, _
       ByVal Validate As System.Boolean, _
       ByVal LockInBlock As System.Boolean, _
       ByVal PositionBelowLastDefinition As System.Boolean _
    ) As AttributeDefinition

C# |
--- | ---
    AttributeDefinition InsertAttributeDefinition(
       System.string Name,
       System.string Caption,
       System.string DefaultValue,
       System.double PositionX,
       System.double PositionY,
       System.double PositionZ,
       System.string TextStyle,
       dsTextJustification_e Justification,
       System.double Height,
       System.double Rotation,
       System.bool Fixed,
       System.bool Hidden,
       System.bool Predefined,
       System.bool Validate,
       System.bool LockInBlock,
       System.bool PositionBelowLastDefinition
    )

JavaScript |
--- | ---
    InsertAttributeDefinition(
       Name : String,
       Caption : String,
       DefaultValue : String,
       PositionX : Number,
       PositionY : Number,
       PositionZ : Number,
       TextStyle : String,
       Justification : String,
       Height : Number,
       Rotation : Number,
       Fixed : Boolean,
       Hidden : Boolean,
       Predefined : Boolean,
       Validate : Boolean,
       LockInBlock : Boolean,
       PositionBelowLastDefinition : Boolean
    ) : dsAttributeDefinition

COM native C++ |
--- | ---
    HRESULT InsertAttributeDefinition(
       BSTR Name,
       BSTR Caption,
       BSTR DefaultValue,
       DOUBLE PositionX,
       DOUBLE PositionY,
       DOUBLE PositionZ,
       BSTR TextStyle,
       dsTextJustification_e Justification,
       DOUBLE Height,
       DOUBLE Rotation,
       VARIANT_BOOL Fixed,
       VARIANT_BOOL Hidden,
       VARIANT_BOOL Predefined,
       VARIANT_BOOL Validate,
       VARIANT_BOOL LockInBlock,
       VARIANT_BOOL PositionBelowLastDefinition,
       IAttributeDefinition** AttributeDefinition
    )

C++ |
--- | ---
    DSRESULT InsertAttributeDefinition(
       const dsString& Name,
       const dsString& Caption,
       const dsString& DefaultValue,
       double PositionX,
       double PositionY,
       double PositionZ,
       const dsString& TextStyle,
       dsTextJustification_e Justification,
       double Height,
       double Rotation,
       bool Fixed,
       bool Hidden,
       bool Predefined,
       bool Validate,
       bool LockInBlock,
       bool PositionBelowLastDefinition,
       dsAttributeDefinition** AttributeDefinition
    )

#### Parameters

Name
  Name of the BlockAttribute
Caption
  Text that displays at the command window during Block insertion
DefaultValue
  Visible component of the BlockAttribute
PositionX
  x coordinate for the insertion point of the BlockAttribute
PositionY
  y coordinate for the insertion point of the BlockAttribute
PositionZ
  z coordinate for the insertion point of the BlockAttribute
TextStyle
  Text style of the BlockAttribute
Justification
  Position and alignment of the BlockAttribute text in relation to the insertion point
Height
  Text size of the BlockAttribute
Rotation
  Insertion angle of the BlockAttribute
Fixed
  True to make the default value of the BlockAttribute a constant value, false to make it a variable value
Hidden
  True to hide the BlockAttribute in Block references, false to show it
Predefined
  True to use the default values, false to request a value
Validate
  True to prompt the user for verification that the BlockAttribute value is correct when inserting a Block, false to not
LockInBlock
  True to lock the BlockAttribute within the Block reference, false to not
PositionBelowLastDefinition
  True to align the current BlockAttribute below the previous one, false to not (see Remarks)
AttributeDefinition[out] or Return Value
  IAttributeDefinition

# Remarks

The PositionBelowLastDefinition parameter is ignored when the entity is created in temporary mode.

# See Also

####

ISketchManager Interface
ISketchManager Members

# Availability

DraftSight V1R1.4