InsertPicture Method (ISketchManager)

InsertPicture Method (ISketchManager) | Send Feedback
See Also Example

Pic[out]
  Referenced image

PathName
  Path and file name of the Referenced image to insert

InsertX
  x coordinate where to insert the Referenced image

InsertY
  y coordinate where to insert the Referenced image

InsertZ
  z coordinate where to insert the Referenced image

Scale
  Scale factor for each axis

Rotation
  Angle by which to rotate the Referenced image (see Remarks)

Inserts a Referenced image.

# Syntax

Visual Basic |
--- | ---
    Function InsertPicture( _
       ByVal PathName As System.String, _
       ByVal InsertX As System.Double, _
       ByVal InsertY As System.Double, _
       ByVal InsertZ As System.Double, _
       ByVal Scale As System.Double, _
       ByVal Rotation As System.Double _
    ) As ReferenceImage

C# |
--- | ---
    ReferenceImage InsertPicture(
       System.string PathName,
       System.double InsertX,
       System.double InsertY,
       System.double InsertZ,
       System.double Scale,
       System.double Rotation
    )

JavaScript |
--- | ---
    InsertPicture(
       PathName : String,
       InsertX : Number,
       InsertY : Number,
       InsertZ : Number,
       Scale : Number,
       Rotation : Number
    ) : dsReferenceImage

COM native C++ |
--- | ---
    HRESULT InsertPicture(
       BSTR PathName,
       DOUBLE InsertX,
       DOUBLE InsertY,
       DOUBLE InsertZ,
       DOUBLE Scale,
       DOUBLE Rotation,
       IReferenceImage** Pic
    )

C++ |
--- | ---
    DSRESULT InsertPicture(
       const dsString& PathName,
       double InsertX,
       double InsertY,
       double InsertZ,
       double Scale,
       double Rotation,
       dsReferenceImage** Pic
    )

#### Parameters

PathName
  Path and file name of the Referenced image to insert
InsertX
  x coordinate where to insert the Referenced image
InsertY
  y coordinate where to insert the Referenced image
InsertZ
  z coordinate where to insert the Referenced image
Scale
  Scale factor for each axis
Rotation
  Angle by which to rotate the Referenced image (see Remarks)
Pic[out] or Return Value
  Referenced image

# Example

This code snippet shows how to insert a Referenced image.

#### COM native C++

> bstr_t imageFileName ( L"<path_and file_name_of_image>" );

> double insertX = 0, insertY = 0, insertZ = 0, scale = 1, rotation = 0;

> ReferenceImagePtr imageEntity = sketchMgr->InsertPicture( imageFileName, insertX, insertY, insertZ, scale, rotation );

# Example

Fire Application and Document Events (C#)
Fire Application and Document Events (VB.NET)
Fire Application and Document Events (VBA)
Insert Picture (C#)
Insert Picture (VB.NET)
Insert Picture (VBA)

# Remarks

Use a positive value for Rotation to rotate the Referenced image counterclockwise and a negative value to rotate the Referenced image clockwise.

# See Also

####

ISketchManager Interface
ISketchManager Members
ISketchManager::DetachReferenceImage Method ()
IReferenceImage::Reload Method ()
IReferenceImage::Unload Method ()

# Availability

DraftSight V1R1