Allows access to a raster Referenced image.
This code snippet shows how to get the Referenced image, if the selected object is an IReferenceImage object.
COM native C++
long selCount = dsSelManager->GetSelectedObjectCount( dsSelectionSetType_Current );
if( selCount > 0 )
{
for( long i = 0; i < selCount; ++i )
{
//Get selected object type
dsObjectType_e retObjType;
IDispatchPtr selObj = dsSelManager->GetSelectedObject( dsSelectionSetType_Current, i, &retObjType );
//If selected object is an image
if( dsReferenceImageType == retObjType )
{
IReferenceImagePtr dsImage( selObj );
. . .
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 );