Visual Basic | |
---|---|
Function PromptForBlockInsertion( _ ByVal PreviewBlockName As System.String, _ ByVal SpecifyScale As System.Boolean, _ ByVal DefaultScaleX As System.Double, _ ByVal DefaultScaleY As System.Double, _ ByVal DefaultScaleZ As System.Double, _ ByVal SpecifyRotation As System.Boolean, _ ByVal DefaultRotation As System.Double, _ ByRef X As System.Double, _ ByRef Y As System.Double, _ ByRef Z As System.Double, _ ByRef ScaleX As System.Double, _ ByRef ScaleY As System.Double, _ ByRef ScaleZ As System.Double, _ ByRef Rotation As System.Double _ ) As dsPromptResultType_e |
C# | |
---|---|
dsPromptResultType_e PromptForBlockInsertion( System.string PreviewBlockName, System.bool SpecifyScale, System.double DefaultScaleX, System.double DefaultScaleY, System.double DefaultScaleZ, System.bool SpecifyRotation, System.double DefaultRotation, out System.double X, out System.double Y, out System.double Z, out System.double ScaleX, out System.double ScaleY, out System.double ScaleZ, out System.double Rotation ) |
JavaScript | |
---|---|
PromptForBlockInsertion( PreviewBlockName : String, SpecifyScale : Boolean, DefaultScaleX : Number, DefaultScaleY : Number, DefaultScaleZ : Number, SpecifyRotation : Boolean, DefaultRotation : Number ) : { X : Number, Y : Number, Z : Number, ScaleX : Number, ScaleY : Number, ScaleZ : Number, Rotation : Number, Result : String } |
COM native C++ | |
---|---|
HRESULT PromptForBlockInsertion( BSTR PreviewBlockName, VARIANT_BOOL SpecifyScale, DOUBLE DefaultScaleX, DOUBLE DefaultScaleY, DOUBLE DefaultScaleZ, VARIANT_BOOL SpecifyRotation, DOUBLE DefaultRotation, DOUBLE* X, DOUBLE* Y, DOUBLE* Z, DOUBLE* ScaleX, DOUBLE* ScaleY, DOUBLE* ScaleZ, DOUBLE* Rotation, dsPromptResultType_e* Result ) |
C++ | |
---|---|
DSRESULT PromptForBlockInsertion( const dsString& PreviewBlockName, bool SpecifyScale, double DefaultScaleX, double DefaultScaleY, double DefaultScaleZ, bool SpecifyRotation, double DefaultRotation, double* X, double* Y, double* Z, double* ScaleX, double* ScaleY, double* ScaleZ, double* Rotation, dsPromptResultType_e* Result ) |
Parameters
- PreviewBlockName
- Name of the Block definition to insert to create the Block instance
- SpecifyScale
- True to use the values specified for DefaultScaleX, DefaultScaleY, and DefaultScaleZ for the Block instance's scale factors, false to use the user-interactive values (see Remarks)
- DefaultScaleX
- Scale factor for the x axis for the Block instance if SpecifyScale is set to true (see Remarks)
- DefaultScaleY
- Scale factor for the y axis for the Block instance if SpecifyScale is set to true (see Remarks)
- DefaultScaleZ
- Scale factor for the z axis for the Block instance if SpecifyScale is set to true (see Remarks)
- SpecifyRotation
True to use the value specified for DefaultRotation for the Block instance's rotation angle, false to use the user-interactive value (see Remarks)
- DefaultRotation
- Angle, in radians, by which to rotate the Block instance if SpecifyRotation is set to true (see Remarks)
- X[out]
- x coordinate where to insert the Block instance
- Y[out]
- y coordinate where to insert the Block instance
- Z[out]
- z coordinate where to insert the Block instance
- ScaleX[out]
- Scale factor for the x axis of the Block instance
- ScaleY[out]
- Scale factor for the y axis of the Block instance
- ScaleZ[out]
- Scale factor for the z axis of the Block instance
- Rotation[out]
- Angle, in radians, by which to rotate the Block instance
- Result[out] or Return Value
- Status of the input for inserting the Block instance as defined in dsPromptResultType_e
If this parameter... | Is set to... | Then... |
SpecifyScale | True | The DefaultScaleX, DefaultScaleY, and DefaultScaleZ values are used to scale the Block instance when the user presses the Enter key when prompted for these values in the command window. |
False | Either the values typed in the command window, or the coordinates that correspond to the point where the user clicks in the graphics area, are used to scale the Block instance. | |
SpecifyRotation | True |
The DefaultRotation value is used for the rotation angle of the Block instance when the user presses the Enter key when prompted for this value in the command window. |
False | Either the value typed in the command window, or the angle that corresponds to the point where the user clicks in the graphics area, is used for the rotation angle of the Block instance. |
NOTE: A positive value for the rotation angle rotates the Block instance counterclockwise, and a negative value rotates the Block instance clockwise.
Typical use of this method involves:
- Defining the Block definition using IDocument::CreateBlockDefinition, if needed. If a Block definition already exists, skip this step.
- Defining how to insert the Block using ICommandMessage::PromptForBlockInsertion.
- Inserting the Block using ISketchManager::InsertBlock2 and the output values of ICommandMessage::PromptForBlockInsertion.
DraftSight V1R3.1