Utility APIs
The methods specified in this section enable you to obtain the handle to the server objects to access them. The handle may be the aliased URL or the model name of the http URL. These utilities enable the conversion of one type of handle to another.
Methods Introduced:
The method pfcServer.Server.GetAliasedUrl enables you to search for a server object by its name. Specify the complete filename of the object as the input, for example, test_part.prt. The method returns the aliased URL for a model on the server. For more information regarding the aliased URL, refer to the section Aliased URL. During the search operation, the workspace takes precedence over the shared space.
You can also use this method to search for files that are not in the Creo format. For example, my_text.txt, prodev.dat, intf_file.stp, and so on.
The method pfcSession.BaseSession.GetModelNameFromAliasedUrl returns the name of the object from the given aliased URL on the server.
The method pfcSession.BaseSession.GetUrlFromAliasedUrl converts an aliased URL to a standard URL for the objects on the server.
For example, wtws://my_alias/Creo Parametric/abcd.prt is converted to an appropriate URL on the server as <server.mycompany.com>/Windchill.
The method pfcSession.BaseSession.GetAliasFromAliasedUrl returns the server alias from aliased URL.
Was this helpful?