public class JlinkUtils
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
JlinkUtils.Regenerator
Interface for the special handler used by the regenerate function
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CREO7_AUTH |
static java.lang.String |
CREO8_AUTH |
static int |
FILENAME_LIMIT |
static java.lang.String |
OPTION_REGEN_HNDLG |
static java.lang.String |
VALUE_NO_RESOLVE |
static java.lang.String |
VALUE_RESOLVE |
| Constructor and Description |
|---|
JlinkUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Object |
callCreoFunction(java.lang.String className,
java.lang.Object[] args)
Call an externally-defined function which requires Creo (as opposed to
older functions which work with Pro/E Wildfire 4).
|
static void |
changeDirectory(CallSession session,
java.lang.String dir)
Change Creo's current working directory
|
static void |
checkProeVersion(int minVersion,
AbstractJLISession jlSession)
Checks whether the current Proe version is greater than or equal to a minimum version.
|
static boolean |
checkValueFilter(java.lang.String text,
java.util.regex.Pattern valuePtn)
Check whether a string matches a search pattern
|
static java.util.List<java.lang.Integer> |
componentPathToList(CallComponentPath path)
Convert a ComponentPath to a Java Integer list
|
static JLIException |
createBareException(java.lang.Exception e,
java.lang.String msg)
Create a new JLIException that wraps a regular Exception.
|
static JLIException |
createException(java.lang.Exception e)
Create a new JLIException that wraps a regular Exception.
|
static JLIException |
createException(java.lang.Exception e,
java.lang.String msg)
Create a new JLIException that wraps a regular Exception.
|
static void |
displayModel(CallSession session,
CallModel m,
boolean activate)
Display a model in Creo.
|
static java.lang.String |
extractInstance(java.lang.String filename)
Find the instance portion of a file name.
|
static java.lang.String |
extractNextGeneric(java.lang.String filename)
Find the immediate generic portion of a file name.
|
static java.lang.String |
extractTopGeneric(java.lang.String filename)
Find the top-level generic portion of a file name.
|
static java.lang.String |
fileInstanceToFilename(java.lang.String genericFilename,
java.lang.String instanceName)
Combine a generic filename (such as bolt.prt) and an instance name (such as long_bolt)
to a standard Creo filename (such as long_bolt<bolt>.prt).
|
static JLTransform |
genTransformTable(CallAssembly baseAssembly,
java.util.List<java.lang.Integer> curPath,
int pathlen)
Get the 3D transform for a component in an assembly and convert it to a JLTransform object.
|
static CallTransform3D |
genTransformTable2(CallAssembly baseAssembly,
java.util.List<java.lang.Integer> curPath,
int pathlen)
Get the 3D transform for a component in an assembly
|
static CallBaseDimension |
getDimension(CallModel m,
java.lang.String name,
boolean noid)
Retrieve a dimension from a model.
|
static CallFeature |
getFeatureForPath(CallSession session,
CallSolid wrapping_solid,
java.util.List<java.lang.Integer> path)
Retrieve a feature from a model given a component path
|
static java.lang.String |
getFeatureName(CallFeature feat)
Get the name for a feature.
|
static CallModel |
getFile(CallSession session,
java.lang.String filename,
boolean errorOnNotFound)
Get a model that is open in Creo
|
static CallModel |
getFile(CallSession session,
java.lang.String dirname,
java.lang.String filename)
Get a model that is open in Creo
|
static CallModel |
getFile(JLISession sess,
java.lang.String filename,
boolean errorOnNotFound)
Get a model that is open in Creo
|
static CallModelItem |
getLayer(CallModel m,
java.lang.String name)
Retrieve a Layer from a Model.
|
static CallModel |
getMfgModel(CallSession session,
CallMFG mfg)
Get a model for a MFG model.
|
static CallSolid |
getModelSolid(CallSession session,
java.lang.String modelname)
Get a model that is open in Creo.
|
static com.ptc.pfc.pfcModel.ModelType |
getModelTypeForExtension(java.lang.String ext)
Determine the model type for a given file extension
|
static CallModelItem |
getNote(CallModel m,
java.lang.String name)
Retrieve a note from a model.
|
static CallModelItem |
getNote(CallModel m,
java.lang.String name,
boolean noid)
Retrieve a note from a model.
|
static CallModelItem |
getNote(CallModel m,
java.lang.String name,
com.ptc.pfc.pfcModelItem.ModelItemType type)
Retrieve a note from a model.
|
static CallModelItem |
getNote(CallModel m,
java.lang.String name,
com.ptc.pfc.pfcModelItem.ModelItemType type,
boolean noid)
Retrieve a note from a model.
|
static com.ptc.pfc.pfcModelItem.ModelItemType |
getNoteType(CallModel m)
Retrieve the appropriate ModelItemType for notes for a model.
|
static boolean |
getParamInfo(CallModel model,
CallParameterOwner m,
CallParameter param,
ParameterData out,
boolean encoded,
java.util.regex.Pattern valuePtn)
Get detailed information about a parameter.
|
static java.lang.String |
getParamTypeString(int ptype)
Translate a Creo parameter value type into a JSHell parameter data type
|
static CallParamValue |
getParamValue(CallParameter param) |
static java.lang.String |
getPath(CallModel m)
Get a Model's directory path, including drive letter
|
static java.lang.String |
getPtcErrorText(int code)
Convert a PTC error code into text.
|
static SimpRepData |
getSimpRepInfo(CallSimpRep rep)
Get detailed information about a model's Simplified Representation
|
static SimpRepData |
getSimpRepInfo(CallSolid solid)
Get detailed information about a model's Simplified Representation
|
static java.lang.String |
instGenericExtToFilename(java.lang.String instanceName,
java.lang.String genericName,
java.lang.String extension)
Combine an instance name (such as long_bolt), a generic name (such as bolt) and a file
extension (such as .prt) to a standard Creo filename (such as long_bolt<bolt>.prt).
|
static java.lang.String |
instGenericToFilename(java.lang.String instanceFilename,
java.lang.String generic)
Combine an instance filename (such as long_bolt.prt) and a generic name (such as bolt)
to a standard Creo filename (such as long_bolt<bolt>.prt).
|
static java.util.List<java.lang.Integer> |
intSeqToList(CallIntSeq seq)
Convert a JLink intseq (integer sequence) to a Java Integer list
|
static int |
isDimId(java.lang.String name)
Check whether a name is of the form that indicates a dimension ID.
|
static boolean |
isModelActive(CallSession session,
CallModel m)
Check whether a model is the active model in Creo
|
static int |
isNoteId(java.lang.String name)
Check whether a name is of the form that indicates a note ID.
|
static boolean |
isRelativePath(java.lang.String dirname)
Check whether a given path is relative or absolute
|
static boolean |
isSuppressed(CallFeature feat)
Check the status of a feature to see whether it is suppressed
|
static java.lang.String |
makeWindchillServerUrl(java.lang.String serverAlias,
java.lang.String workspace) |
static java.lang.String |
makeWindchillUrl(CallServer server,
java.lang.String workspace)
Construct a URL for a Windchill workspace of the form wtws://<server-alias>/<workspace>/
|
static java.lang.String |
makeWindchillUrl(java.lang.String serverAlias,
java.lang.String workspace)
Construct a URL for a Windchill workspace of the form wtws://<server-alias>/<workspace>/
|
static void |
postfixResolveModeFix(CallSession session,
AbstractJLISession jlSession,
boolean resolveMode)
Workaround for Creo bug, where the "regen_failure_handling" config option
needs to be set to "resolve_mode" before attempting a regenerate, so that
failures will be handled properly.
|
static void |
postfixResolveModeFix(CallSession session,
AbstractJLISession jlSession,
boolean resolveMode,
java.lang.String debugKey)
Workaround for Creo bug, where the "regen_failure_handling" config option
needs to be set to "resolve_mode" before attempting a regenerate, so that
failures will be handled properly.
|
static boolean |
prefixResolveModeFix(CallSession session,
AbstractJLISession jlSession)
Workaround for Creo bug, where the "regen_failure_handling" config option
needs to be set to "resolve_mode" before attempting a regenerate, so that
failures will be handled properly.
|
static boolean |
prefixResolveModeFix(CallSession session,
AbstractJLISession jlSession,
java.lang.String debugKey)
Workaround for Creo bug, where the "regen_failure_handling" config option
needs to be set to "resolve_mode" before attempting a regenerate, so that
failures will be handled properly.
|
static java.lang.String |
ptcError(java.lang.Exception e,
java.lang.String msg)
Try to generate a friendlier error message for a Creo exception.
|
static void |
regenerate(CallSession session,
AbstractJLISession jlSession,
JlinkUtils.Regenerator regener,
boolean setConfig)
Regenerate a Creo object
|
static void |
regenerate(CallSession session,
AbstractJLISession jlSession,
JlinkUtils.Regenerator regener,
boolean setConfig,
java.lang.String debugKey)
Regenerate a Creo object.
|
static void |
resolveGenerics(CallSession session,
CallModel m)
Make sure that the generic instance of a model is loaded into Creo.
|
static java.lang.String |
resolveRelativePath(CallSession session,
java.lang.String dirname)
Takes a relative file/directory path, and prepends it with Creo's current working directory.
|
static void |
setAuthCode(CallSession session,
AbstractJLISession jlSession) |
static void |
setParamValue(CallModel m,
CallParamValue pval,
java.lang.Object value,
boolean encoded)
Set or create a parameter value in a model
|
static void |
setParamValue(CallParamValue target_pval,
CallParamValue source_pval)
Copy a value from one parameter to another
|
static boolean |
setResolveModeOption(CallRegenInstructions reginst,
boolean value) |
static void |
showHexBytes(byte[] data)
Debugging function to print out a byte array
|
static void |
showHexString(java.lang.String str)
Debugging function to print out the bytes in a string
|
static java.lang.String |
stripWindchillUrl(java.lang.String fileUrl)
Take a Windchill workspace file URL and strip out file name.
|
static java.lang.String |
toolkitError(com.ptc.pfc.pfcExceptions.XToolkitError e,
java.lang.String msg)
Try to generate a friendlier error message for a Pro/TOOLKIT exception.
|
static java.lang.String |
translateDisplayStatus(int status)
Translate a Creo display status into a JSHell display status
|
static java.lang.String |
translateFeatureStatus(int status)
Translate a Creo feature status into a JSHell feature status
|
static void |
validateFilename(java.lang.String filename)
Validates that a file name follows the rules for Creo file names.
|
public static final int FILENAME_LIMIT
public static final java.lang.String CREO7_AUTH
public static final java.lang.String CREO8_AUTH
public static final java.lang.String OPTION_REGEN_HNDLG
public static final java.lang.String VALUE_RESOLVE
public static final java.lang.String VALUE_NO_RESOLVE
public static CallModel getFile(CallSession session, java.lang.String dirname, java.lang.String filename) throws com.ptc.cipjava.jxthrowable
session - The Creo sessiondirname - The directory name the model was loaded fromfilename - The filename for the modelcom.ptc.cipjava.jxthrowablepublic static CallModel getFile(CallSession session, java.lang.String filename, boolean errorOnNotFound) throws JLIException, com.ptc.cipjava.jxthrowable
session - The Creo sessionfilename - The filename for the modelerrorOnNotFound - Whether to throw an exception if the model was not in memoryJLIExceptioncom.ptc.cipjava.jxthrowablepublic static CallModel getFile(JLISession sess, java.lang.String filename, boolean errorOnNotFound) throws JLIException, java.lang.Exception
sess - The JShell sessionfilename - The filename for the modelerrorOnNotFound - Whether to throw an exception if the model was not in memoryJLIExceptionjava.lang.Exceptionpublic static CallSolid getModelSolid(CallSession session, java.lang.String modelname) throws JLIException, com.ptc.cipjava.jxthrowable
session - The Creo sessionmodelname - The filename for the modelJLIExceptioncom.ptc.cipjava.jxthrowablepublic static CallModel getMfgModel(CallSession session, CallMFG mfg) throws com.ptc.cipjava.jxthrowable, JLIException
session - The Creo sessionmfg - The MFG objectcom.ptc.cipjava.jxthrowableJLIExceptionpublic static boolean isRelativePath(java.lang.String dirname)
dirname - The directory name to check (can also be a file namepublic static java.lang.String resolveRelativePath(CallSession session, java.lang.String dirname) throws JLIException, com.ptc.cipjava.jxthrowable
session - The Creo sessiondirname - The relative pathJLIExceptioncom.ptc.cipjava.jxthrowablepublic static void changeDirectory(CallSession session, java.lang.String dir) throws JLIException, com.ptc.cipjava.jxthrowable
session - The Creo sessiondir - The target directoryJLIExceptioncom.ptc.cipjava.jxthrowablepublic static com.ptc.pfc.pfcModel.ModelType getModelTypeForExtension(java.lang.String ext)
ext - The file extensionpublic static JLIException createException(java.lang.Exception e)
e - The original Exceptionpublic static JLIException createException(java.lang.Exception e, java.lang.String msg)
e - The original Exceptionmsg - A text message to go with the Exception.public static JLIException createBareException(java.lang.Exception e, java.lang.String msg)
e - The original Exceptionmsg - A text message to go with the Exception.public static java.lang.String ptcError(java.lang.Exception e,
java.lang.String msg)
e - The original Exceptionmsg - A text message to go with the Exception.public static java.lang.String toolkitError(com.ptc.pfc.pfcExceptions.XToolkitError e,
java.lang.String msg)
e - The original Exceptionmsg - A text message to go with the Exceptionpublic static java.lang.String getPtcErrorText(int code)
code - The code to convertpublic static void displayModel(CallSession session, CallModel m, boolean activate) throws com.ptc.cipjava.jxthrowable
session - The Creo sessionm - The model to displayactivate - Whether to activate the model's windowcom.ptc.cipjava.jxthrowablepublic static boolean isModelActive(CallSession session, CallModel m) throws com.ptc.cipjava.jxthrowable
session - The Creo sessionm - The model to checkcom.ptc.cipjava.jxthrowablepublic static java.lang.String getFeatureName(CallFeature feat) throws com.ptc.cipjava.jxthrowable
feat - The Feature to checkcom.ptc.cipjava.jxthrowablepublic static boolean isSuppressed(CallFeature feat) throws com.ptc.cipjava.jxthrowable
feat - The Feature to checkcom.ptc.cipjava.jxthrowablepublic static java.lang.String getPath(CallModel m) throws com.ptc.cipjava.jxthrowable
m - The model to checkcom.ptc.cipjava.jxthrowablepublic static java.lang.String translateFeatureStatus(int status)
status - The Creo feature statuspublic static java.lang.String translateDisplayStatus(int status)
status - The Creo display statuspublic static java.lang.String getParamTypeString(int ptype)
ptype - The Creo parameter value typepublic static CallBaseDimension getDimension(CallModel m, java.lang.String name, boolean noid) throws com.ptc.cipjava.jxthrowable
This method will handle both Solid and Drawing dimensions.
m - The model which owns the dimensionname - The name of the dimension, or a dimension ID in the form d#.noid - Whether to allow a dimension ID to be requested in the name fieldcom.ptc.cipjava.jxthrowablepublic static int isDimId(java.lang.String name)
name - The name to checkpublic static CallModelItem getNote(CallModel m, java.lang.String name, boolean noid) throws com.ptc.cipjava.jxthrowable
This method will handle both Solid and Drawing notes.
m - The model or drawing which owns the notename - The name of the note, or a note ID in the form note_#.noid - Whether to allow a note ID to be requested in the name fieldcom.ptc.cipjava.jxthrowablepublic static CallModelItem getNote(CallModel m, java.lang.String name, com.ptc.pfc.pfcModelItem.ModelItemType type, boolean noid) throws com.ptc.cipjava.jxthrowable
This method will handle both Solid and Drawing notes.
m - The model or drawing which owns the notename - The name of the note, or a note ID in the form note_#.type - The ModelItemType to find; this allows the method to handle both Solid and Drawing modelsnoid - Whether to allow a note ID to be requested in the name fieldcom.ptc.cipjava.jxthrowablepublic static CallModelItem getNote(CallModel m, java.lang.String name) throws com.ptc.cipjava.jxthrowable
This method will handle both Solid and Drawing notes.
m - The model or drawing which owns the notename - The name of the note.com.ptc.cipjava.jxthrowablepublic static CallModelItem getNote(CallModel m, java.lang.String name, com.ptc.pfc.pfcModelItem.ModelItemType type) throws com.ptc.cipjava.jxthrowable
This method will handle both Solid and Drawing notes.
m - The model or drawing which owns the notename - The name of the note.type - The ModelItemType to find; this allows the method to handle both Solid and Drawing modelscom.ptc.cipjava.jxthrowablepublic static int isNoteId(java.lang.String name)
name - The name to checkpublic static CallModelItem getLayer(CallModel m, java.lang.String name) throws com.ptc.cipjava.jxthrowable
m - The Model which owns the Layername - The layer namecom.ptc.cipjava.jxthrowablepublic static void setParamValue(CallModel m, CallParamValue pval, java.lang.Object value, boolean encoded) throws JLIException, com.ptc.cipjava.jxthrowable
m - The model containing the parameterpval - The Creo parameter value object to updatevalue - The value to setencoded - True if the value is Base64-encodedJLIExceptioncom.ptc.cipjava.jxthrowablepublic static void setParamValue(CallParamValue target_pval, CallParamValue source_pval) throws com.ptc.cipjava.jxthrowable
target_pval - The Creo parameter value object to copy tosource_pval - The Creo parameter value object to copy fromcom.ptc.cipjava.jxthrowablepublic static CallFeature getFeatureForPath(CallSession session, CallSolid wrapping_solid, java.util.List<java.lang.Integer> path) throws JLIException, com.ptc.cipjava.jxthrowable
session - The Creo sessionwrapping_solid - The solid containing the featurepath - The component path to the featureJLIExceptioncom.ptc.cipjava.jxthrowablepublic static boolean prefixResolveModeFix(CallSession session, AbstractJLISession jlSession) throws com.ptc.cipjava.jxthrowable
This method must be called before doing a regenerate, and will set the config option to "resolve_mode".
This workaround is needed for Creo 2 (WF5) and higher.
jlSession - The JShell sessioncom.ptc.cipjava.jxthrowablepublic static boolean prefixResolveModeFix(CallSession session, AbstractJLISession jlSession, java.lang.String debugKey) throws com.ptc.cipjava.jxthrowable
This method must be called before doing a regenerate, and will set the config option to "resolve_mode".
This workaround is needed for Creo 2 (WF5) and higher
jlSession - The JShell sessiondebugKey - If not null, a debug log message is sent with this debug keycom.ptc.cipjava.jxthrowablepublic static void postfixResolveModeFix(CallSession session, AbstractJLISession jlSession, boolean resolveMode) throws com.ptc.cipjava.jxthrowable
This method must be called after doing a regenerate, and will set the config option to "no_resolve_mode" if the resolveMode is false.
This workaround is needed for Creo 2 (WF5) and higher
session - The Creo sessionjlSession - The jshell sessionresolveMode - Whether the option was already set to "resolve_mode" before thecom.ptc.cipjava.jxthrowablepublic static void postfixResolveModeFix(CallSession session, AbstractJLISession jlSession, boolean resolveMode, java.lang.String debugKey) throws com.ptc.cipjava.jxthrowable
This method must be called after doing a regenerate, and will set the config option to "no_resolve_mode" if the resolveMode is false.
This workaround is needed for Creo 2 (WF5) and higher
session - The Creo sessionjlSession - The jshell sessionresolveMode - Whether the option was already set to "resolve_mode" before prefixResolveModeFix was calleddebugKey - If not null, a debug log message is sent with this debug keycom.ptc.cipjava.jxthrowablepublic static boolean setResolveModeOption(CallRegenInstructions reginst, boolean value)
public static void setAuthCode(CallSession session, AbstractJLISession jlSession) throws com.ptc.cipjava.jxthrowable
com.ptc.cipjava.jxthrowablepublic static void regenerate(CallSession session, AbstractJLISession jlSession, JlinkUtils.Regenerator regener, boolean setConfig) throws com.ptc.cipjava.jxthrowable
jlSession - The JShell sessionregener - The handler class which performs the regenerationsetConfig - True to update the "regen_failure_handling" config optioncom.ptc.cipjava.jxthrowablepublic static void regenerate(CallSession session, AbstractJLISession jlSession, JlinkUtils.Regenerator regener, boolean setConfig, java.lang.String debugKey) throws com.ptc.cipjava.jxthrowable
jlSession - The JShell sessionregener - The handler class which performs the regenerationsetConfig - True to update the "regen_failure_handling" config optiondebugKey - If not null, a debug log message is sent with this debug keycom.ptc.cipjava.jxthrowablepublic static JLTransform genTransformTable(CallAssembly baseAssembly, java.util.List<java.lang.Integer> curPath, int pathlen) throws com.ptc.cipjava.jxthrowable, JLIException
baseAssembly - The assembly containing the componentcurPath - The component path for the componentpathlen - The length of the component path; this allows you to use a portion of the component pathcom.ptc.cipjava.jxthrowableJLIExceptionpublic static CallTransform3D genTransformTable2(CallAssembly baseAssembly, java.util.List<java.lang.Integer> curPath, int pathlen) throws com.ptc.cipjava.jxthrowable
baseAssembly - The assembly containing the componentcurPath - The component path for the componentpathlen - The length of the component path; this allows you to use a portion of the component pathcom.ptc.cipjava.jxthrowablepublic static boolean getParamInfo(CallModel model, CallParameterOwner m, CallParameter param, ParameterData out, boolean encoded, java.util.regex.Pattern valuePtn) throws JLIException, com.ptc.cipjava.jxthrowable
If the parameter value is a String which contains binary data, then the encoded argument will be set to true automatically.
If the valuePtn argument is filled in, then the value is checked against the pattern. If the value doesn't match the pattern, the output is not updated and the method returns false.
model - The model containing the parameterm - The owner of the parameter (may not be the same as the model; for example, it may be a feature)param - The Creo parameter dataout - The JShell parameter data output by the methodencoded - Whether to return the parameter value as a byte arrayvaluePtn - A pattern to filter the value forJLIExceptioncom.ptc.cipjava.jxthrowablepublic static CallParamValue getParamValue(CallParameter param) throws JLIException, com.ptc.cipjava.jxthrowable
JLIExceptioncom.ptc.cipjava.jxthrowablepublic static void resolveGenerics(CallSession session, CallModel m) throws com.ptc.cipjava.jxthrowable
session - The Creo sessionm - The model which is an instance in a family tablecom.ptc.cipjava.jxthrowablepublic static java.lang.Object callCreoFunction(java.lang.String className,
java.lang.Object[] args)
throws JLIException,
com.ptc.cipjava.jxthrowable
className - The class name for the function extensionargs - An argument list for the functionJLIExceptioncom.ptc.cipjava.jxthrowablepublic static SimpRepData getSimpRepInfo(CallSolid solid) throws JLIException, com.ptc.cipjava.jxthrowable
solid - The model with a Simp RepJLIExceptioncom.ptc.cipjava.jxthrowablepublic static SimpRepData getSimpRepInfo(CallSimpRep rep) throws JLIException, com.ptc.cipjava.jxthrowable
rep - The simplified rep obtained from CreoJLIExceptioncom.ptc.cipjava.jxthrowablepublic static java.util.List<java.lang.Integer> componentPathToList(CallComponentPath path) throws JLIException, com.ptc.cipjava.jxthrowable
path - The component pathJLIExceptioncom.ptc.cipjava.jxthrowablepublic static java.util.List<java.lang.Integer> intSeqToList(CallIntSeq seq) throws JLIException, com.ptc.cipjava.jxthrowable
seq - The integer sequenceJLIExceptioncom.ptc.cipjava.jxthrowablepublic static com.ptc.pfc.pfcModelItem.ModelItemType getNoteType(CallModel m)
m - A model to get the type forpublic static boolean checkValueFilter(java.lang.String text,
java.util.regex.Pattern valuePtn)
throws com.ptc.cipjava.jxthrowable
text - The string to validatevaluePtn - The search patterncom.ptc.cipjava.jxthrowablepublic static java.lang.String extractTopGeneric(java.lang.String filename)
filename - A file name which represents an instance in a family tablepublic static java.lang.String extractNextGeneric(java.lang.String filename)
filename - A file name which represents an instance in a family tablepublic static java.lang.String extractInstance(java.lang.String filename)
filename - A file name which represents an instance in a family tablepublic static java.lang.String instGenericToFilename(java.lang.String instanceFilename,
java.lang.String generic)
instanceFilename - The instance file name, including the file extensiongeneric - The generic name, which does NOT include the file extensionpublic static java.lang.String fileInstanceToFilename(java.lang.String genericFilename,
java.lang.String instanceName)
genericFilename - The generic file name, including the file extensioninstanceName - The instance name, which does NOT include the file extensionpublic static java.lang.String instGenericExtToFilename(java.lang.String instanceName,
java.lang.String genericName,
java.lang.String extension)
instanceName - The instance name, which does NOT include the file extensiongenericName - The generic name, which does NOT include the file extensionextension - The file extension, which may or may not include the dotpublic static void showHexBytes(byte[] data)
data - The array to print outpublic static void showHexString(java.lang.String str)
str - The string to print outpublic static java.lang.String makeWindchillUrl(CallServer server, java.lang.String workspace) throws com.ptc.cipjava.jxthrowable
server - The JLink server objectworkspace - The Windchill workspace namecom.ptc.cipjava.jxthrowablepublic static java.lang.String makeWindchillUrl(java.lang.String serverAlias,
java.lang.String workspace)
throws com.ptc.cipjava.jxthrowable
serverAlias - The Windchill server aliasworkspace - The Windchill workspace namecom.ptc.cipjava.jxthrowablepublic static java.lang.String makeWindchillServerUrl(java.lang.String serverAlias,
java.lang.String workspace)
throws com.ptc.cipjava.jxthrowable
com.ptc.cipjava.jxthrowablepublic static java.lang.String stripWindchillUrl(java.lang.String fileUrl)
fileUrl - The URL for the Windchill workspace filepublic static void validateFilename(java.lang.String filename)
throws JLIException
filename - The name of the file to validate.JLIException - If a validation error occurs, this contains the text of the failure.public static void checkProeVersion(int minVersion,
AbstractJLISession jlSession)
throws JLIException
minVersion - The minimum Creo version requiredjlSession - The JShell sessionJLIExceptionJLProe.setProeVersion(int, AbstractJLISession)