Library | Package Java Toolkit

Interface ModelDescriptor

package com.ptc.pfc.pfcModel;

public interface ModelDescriptor
  extends jxobject



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:
Model.Backup(ModelDescriptor), BaseSession.OpenFile(ModelDescriptor), BaseSession.RetrieveModel(ModelDescriptor), BaseSession.GetModelFromDescr(ModelDescriptor)



Method Summary
StringGetDevice ()
    Get method for attribute "Device"
    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.
StringGetExtension ()
    Retrieves the extension of the model identified by the model descriptor.
StringGetFileName ()
    Returns the file name for the object represented by the model descriptor.
/*optional*/ IntegerGetFileVersion ()
    Get method for attribute "FileVersion"
    The version of the file
StringGetFullName ()
    Retrieves the full name of the model identified by the model descriptor.
/*optional*/ StringGetGenericName ()
    Get method for attribute "GenericName"
    The name of the generic model. If the model is not an instance, this attribute must be null or an empty string.
StringGetHost ()
    Get method for attribute "Host"
    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.
StringGetInstanceName ()
    Get method for attribute "InstanceName"
    The name of the model, or, if the model is an instance, the instance name. This string can be neither null nor empty.
StringGetPath ()
    Get method for attribute "Path"
    The path to the file. Note that this argument is ignored by the RetrieveModel method.
ModelTypeGetType ()
    Get method for attribute "Type"
    The model type. If the model descriptor represents a Creo Parametric related file that is not a true model type, a XUnusedValue exception will result if you try to access this value.
voidSetDevice (String value)
    Set method for attribute "Device"
    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.
voidSetFileVersion ( /*optional*/ Integer value)
    Set method for attribute "FileVersion"
    The version of the file
voidSetGenericName ( /*optional*/ String value)
    Set method for attribute "GenericName"
    The name of the generic model. If the model is not an instance, this attribute must be null or an empty string.
voidSetHost (String value)
    Set method for attribute "Host"
    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.
voidSetInstanceName (String value)
    Set method for attribute "InstanceName"
    The name of the model, or, if the model is an instance, the instance name. This string can be neither null nor empty.
voidSetPath (String value)
    Set method for attribute "Path"
    The path to the file. Note that this argument is ignored by the RetrieveModel method.
voidSetType (ModelType value)
    Set method for attribute "Type"
    The model type. If the model descriptor represents a Creo Parametric related file that is not a true model type, a XUnusedValue exception will result if you try to access this value.

Method Detail

GetType/SetType

ModelTypeGetType ()
voidSetType (ModelType value)


    The model type. If the model descriptor represents a Creo Parametric related file that is not a true model type, a XUnusedValue exception will result if you try to access this value.
Manual References:
Models: Model Descriptors



GetInstanceName/SetInstanceName

StringGetInstanceName ()
voidSetInstanceName (String value)


    The name of the model, or, if the model is an instance, the instance name. This string can be neither null nor empty.
Manual References:
Models: Model Descriptors



GetGenericName/SetGenericName

/*optional*/ StringGetGenericName ()
voidSetGenericName ( /*optional*/ String value)


    The name of the generic model. If the model is not an instance, this attribute must be null or an empty string.
Manual References:
Models: Model Descriptors



GetHost/SetHost

StringGetHost ()
voidSetHost (String value)


    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.



GetDevice/SetDevice

StringGetDevice ()
voidSetDevice (String value)


    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.
Manual References:
Models: Model Descriptors



GetPath/SetPath

StringGetPath ()
voidSetPath (String value)


    The path to the file. Note that this argument is ignored by the RetrieveModel method.
Manual References:
Models: Model Descriptors



GetFileVersion/SetFileVersion

/*optional*/ IntegerGetFileVersion ()
voidSetFileVersion ( /*optional*/ Integer value)


    The version of the file
Manual References:
Models: Model Descriptors, Models: Retrieving Models



GetFullName

StringGetFullName ()


    Retrieves the full name of the model identified by the model descriptor.
Manual References:
Models: Model Descriptors
Returns:
The name of the model. If the model is an instance, its full name has the formInstanceName<GenericName>


GetExtension

StringGetExtension ()


    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


GetFileName

StringGetFileName ()


    Returns the file name for the object represented by the model descriptor.
See Also:
pfcModel.ModelDescriptor_CreateFromFileName(String), pfcModel.ModelDescriptor_Create(ModelType, String, /*optional*/ String), BaseSession.GetModelFromFileName(String), BaseSession.RetrieveModel(ModelDescriptor)
Returns:
The file name, of the form "<name>.<extension>".