API Documentation > Classes > Interface IpfcModelDescriptor
Interface IpfcModelDescriptor
Description
This class includes the information that identifies a Creo Parametric model or file.
Model descriptors can be used to represent models that are not currently in session.
The possible model types are as follows:
MDL_ASSEMBLY
MDL_PART
MDL_DRAWING
MDL_2D_SECTION
MDL_LAYOUT
MDL_DWG_FORMAT
MDL_MFG
MDL_REPORT
MDL_MARKUP
MDL_DIAGRAM
This descriptor does not support the Multi-CAD concept. Refer to Object Toolkit for Multi-CAD support.
See Also:
User Guide References:
Property Summary
Property
as String
The device. On UNIX systems, this field contains an empty string. If you change this value on a UNIX system, Creo Parametric may experience problems when reading or writing the file.
Property
as Long [optional]
The version of the file
Property
as String [optional]
The name of the generic model. If the model is not an instance, this attribute must be null or an empty string.
Property
as String
This is Obsoleted. The host. If the model resides on the local Windows or UNIX host, this field contains an empty string. If you change this value, Creo Parametric may experience problems when reading or writing the file.
Property
as String
The name of the model, or, if the model is an instance, the instance name. This string can be neither null nor empty.
Property
as String
The path to the file. Note that this argument is ignored by the RetrieveModel method.
Property
The model type. If the model descriptor represents a Creo Parametric related file that is not a true model type, a IpfcXUnusedValue exception will result if you try to access this value.
Method Summary
Function
CCpfcModelDescriptor.Create (Type as IpfcModelType, InstanceName as String, GenericName as String [optional]) as IpfcModelDescriptor
Creates a new model descriptor.
Function
Creates a new model descriptor object, given a file name string.
Function
GetExtension () as String
Retrieves the extension of the model identified by the model descriptor.
Function
GetFileName () as String
Returns the file name for the object represented by the model descriptor.
Function
GetFullName () as String
Retrieves the full name of the model identified by the model descriptor.
Property Detail
Property
Device
as String
The device. On UNIX systems, this field contains an empty string. If you change this value on a UNIX system, Creo Parametric may experience problems when reading or writing the file.
Property
FileVersion
as Long [optional]
The version of the file
Property
GenericName
as String [optional]
The name of the generic model. If the model is not an instance, this attribute must be null or an empty string.
Property
Host
as String
This is Obsoleted. The host. If the model resides on the local Windows or UNIX host, this field contains an empty string. If you change this value, Creo Parametric may experience problems when reading or writing the file.
Property
InstanceName
as String
The name of the model, or, if the model is an instance, the instance name. This string can be neither null nor empty.
Property
Path
as String
The path to the file. Note that this argument is ignored by the RetrieveModel method.
Property
Type
The model type. If the model descriptor represents a Creo Parametric related file that is not a true model type, a IpfcXUnusedValue exception will result if you try to access this value.
Method Detail
Function
CCpfcModelDescriptor.Create
(Type as IpfcModelType, InstanceName as String, GenericName as String [optional]) as IpfcModelDescriptor
Creates a new model descriptor.
Parameters:
Type
The model type
InstanceName
The name of the model, or, if the model is an instance, the instance name.This string can be neither null nor empty.
GenericName
The name of the generic model. If the model is not an instance, this attributemust be null or an empty string.
Returns:
The new ModelDescriptor
Function
CCpfcModelDescriptor.CreateFromFileName
(FileName as String) as IpfcModelDescriptor
Creates a new model descriptor object, given a file name string.
Exceptions thrown (but not limited to):
IpfcXInvalidFileName - Invalid File Name
See Also:
Parameters:
FileName
The file name, of the form "<name>.<extension>".
Returns:
The new model descriptor object.
Function
GetExtension
() as String
Retrieves the extension of the model identified by the model descriptor.
Model extension gives an extension of the file which stores the model information. Models of the same type have the same extension. The following model extensions are used:
"asm" - for MDL_ASSEMBLY
"prt" - for MDL_PART
"drw" - for MDL_DRAWING
"sec" - for MDL_2D_SECTION and for MDL_3D_SECTION
"lay" - for MDL_LAYOUT
"frm" - for MDL_DWG_FORMAT
"mfg" - for MDL_MFG
"rep" - for MDL_REPORT
"mrk" - for MDL_MARKUP
"dgm" - for MDL_DIAGRAM
Other extensions may be returned for a model descriptor that represents a Creo Parametric file that does not match one of the above types.
Returns:
The model extension
Function
GetFileName
() as String
Returns the file name for the object represented by the model descriptor.
See Also:
Returns:
The file name, of the form "<name>.<extension>".
Function
GetFullName
() as String
Retrieves the full name of the model identified by the model descriptor.
Returns:
The name of the model. If the model is an instance, its full name has the formInstanceName<GenericName>
User Guide References:
Was this helpful?