GetWorkingSpace Method (IBlockInstance) Send Feedback
See Also  Example
Type[out]
Type of working space as defined in dsObjectType_e
WorkSpace[out]

Model or Sheet

Gets the type of working space and the working space object.

Syntax

Visual Basic 
Sub GetWorkingSpace( _
   ByRef Type As dsObjectType_e, _
   ByRef WorkSpace As System.Object _
) 
C# 
void GetWorkingSpace( 
   out dsObjectType_e Type,
   out System.object WorkSpace
)
JavaScript 
GetWorkingSpace(
) : {
   Type : String,
   WorkSpace : Object
}
COM native C++ 
HRESULT GetWorkingSpace( 
   dsObjectType_e* Type,
   IDispatch** WorkSpace
) 
C++ 
DSRESULT GetWorkingSpace( 
   dsObjectType_e* Type,
   dsObject** WorkSpace
) 

Parameters

Type[out]
Type of working space as defined in dsObjectType_e
WorkSpace[out] or Return Value

Model or Sheet

Example

This code snippet shows how to get the ID and working space of a Block instance. This code snippet also shows how to determine if the working space is a model or sheet.

COM native C++

//Get Block instance ID
bstr_t blkInstanceID = blkIns->GetID();

//Get working space
dsObjectType_e oType;
IDispatch pWorkingSpace;
blkIns->GetWorkingSpace( &oType, &pWorkingSpace );

//If working space is a model
if( dsModelType == oType )
{

IModel modelSpace ( pWorkingSpace );
      . . .

}
else
{
      //If working space is a sheet
      if( dsSheetType == oType )
      {
           ISheetPtr sheet( pWorkingSpace );

           . . .

      }

}

Example

 

See Also

Availability

DraftSight V1R1