Sets the AutoCAD entity type that this feature class definition uses when a digitize process runs for this class.
AcMapObjClass::EErrCode SetCreateMethod( const ACHAR* pszEntityType, const ACHAR* pszBlockName );
Parameters |
Description |
pszEntityType |
Input entity type. |
pszBlockName |
Input block name. |
Returns AcMapObjClass::EErrCode eOk if successful. Returns AcMapObjClass::EErrCode eClassNotFromCurrentSchema if the class is not from the current feature-definition file. Returns AcMapObjClass::EErrCode eInvalidType if the entity type is invalid. This error code also is returned if pszBlockName is empty or NULL, even if pszEntityType is AcDbBlockReference::desc()->name(); a name is required to define a valid block create method. Returns AcMapObjClass::EErrCode eClassUnsupportedCreateType if the feature class definition does not support the create method. Returns AcMapObjClass::EErrCode eProductUnsupportedCreateType if the product does not support the create method. Returns AcMapObjClass::EErrCode eFailed if the process failed for some other reason.
The entity type typically matches the value that AcRxClass::name() returns. Invalid types generate an error. The entity types that the digitize process supports are only a subset of the valid entity types, so a type that the feature class definition supports can still be invalid. If a feature class definition uses a specific block reference name as a create method, set pszBlockName to the name and set pszEntityType to NULL.