Library | Module

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:

This descriptor does not support the Multi-CAD concept. Refer to Object Toolkit for Multi-CAD support.


See Also:
IpfcModel.Backup(), IpfcBaseSession.OpenFile(), IpfcBaseSession.RetrieveModel(), IpfcBaseSession.GetModelFromDescr()



Property Summary

PropertyDeviceas 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.
PropertyFileVersionas Long [optional]
The version of the file
PropertyGenericNameas String [optional]
The name of the generic model. If the model is not an instance, this attribute must be null or an empty string.
PropertyHostas 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.
PropertyInstanceNameas String
The name of the model, or, if the model is an instance, the instance name. This string can be neither null nor empty.
PropertyPathas String
The path to the file. Note that this argument is ignored by the RetrieveModel method.
PropertyTypeas IpfcModelType
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

FunctionCCpfcModelDescriptor.Create (Type as IpfcModelType, InstanceName as String, GenericName as String [optional]) as IpfcModelDescriptor
Creates a new model descriptor.
FunctionCCpfcModelDescriptor.CreateFromFileName (FileName as String) as IpfcModelDescriptor
Creates a new model descriptor object, given a file name string.
FunctionGetExtension () as String
Retrieves the extension of the model identified by the model descriptor.
FunctionGetFileName () as String
Returns the file name for the object represented by the model descriptor.
FunctionGetFullName () as String
Retrieves the full name of the model identified by the model descriptor.



Property Detail


PropertyDeviceas 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.




PropertyFileVersionas Long [optional]

The version of the file




PropertyGenericNameas String [optional]

The name of the generic model. If the model is not an instance, this attribute must be null or an empty string.




PropertyHostas 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.




PropertyInstanceNameas String

The name of the model, or, if the model is an instance, the instance name. This string can be neither null nor empty.




PropertyPathas String

The path to the file. Note that this argument is ignored by the RetrieveModel method.




PropertyTypeas IpfcModelType

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


FunctionCCpfcModelDescriptor.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



FunctionCCpfcModelDescriptor.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:
IpfcModelDescriptor.GetFileName(), IpfcModelDescriptor.Create(), IpfcBaseSession.GetModelFromFileName(), IpfcBaseSession.RetrieveModel()
Parameters:
FileName
The file name, of the form "<name>.<extension>".
Returns:
The new model descriptor object.



FunctionGetExtension () 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



FunctionGetFileName () as String

Returns the file name for the object represented by the model descriptor.
See Also:
IpfcModelDescriptor.CreateFromFileName(), IpfcModelDescriptor.Create(), IpfcBaseSession.GetModelFromFileName(), IpfcBaseSession.RetrieveModel()
Returns:
The file name, of the form "<name>.<extension>".



FunctionGetFullName () 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>