Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
(UWGM::UWGM_COMMAND :COMMAND-ID "open" :OBJECTS LISP::NIL) permits to open the "open window" in the windchill workgroup manager.
I would like to open directly a file by lisp command (by cadname).
Example:
(UWGM::UWGM_COMMAND :COMMAND-ID "open" :FILENAME "a.sdpc")
but I don't know the correct lisp parameters accepted by UWGM::UWGM_COMMAND and ptc doesn't tell me (https://www.ptc.com/apps/case_logger_viewer/auth/ssl/case=C11892729)
This would be equivalent to the jlink command (for Creo Parametric):
ModelDescriptor modelDescriptor = pfcModel.ModelDescriptor_CreateFromFileName(fileName);
Window window = session.OpenFile(modelDescriptor);
.... this for a minimal programmatically use ...
Well, it took many releases of Modeling/Model Manager until finally IKIT-functions
like SD-DB-ELEMENT-LOAD were provided to the public.
Once an interface has been published, making changes to the interface is hard or impossible.
Means, that it will possibly take some time until IKIT functions for UWGM are made public.
but in general, I fully support the wish for having such a IKIT.
I am sure that Programmers and Customizers are eagerly waiting for it.
PTC told me:
I have good news for you – I have just learned that the new functionality is already there in 18.1 M050 - it is undocumented still – but we have ok from R&D that it can be used:
SD-UWGM-ELEMENT-LOAD [function]
(sd-uwgm-element-load file-name)
Description:
Windchill Workgroup Manager only:
Loads an element from Windchill identified by file-name and returns this element as a sel-item.
Parameters:
file-name {STRING}
String containing the file name of a model or library part.
Return Value:
loaded-object {SEL_ITEM} - success
sel-item of the element loaded from Windchill
nil - failure
Example:
(sd-uwgm-element-load "abc.sdpc")
SD-UWGM-ELEMENT-STORE [function]
(sd-uwgm-element-store element)
Description:
Windchill Workgroup Manager only:
Store an element to Windchill.
Parameters:
element {SEL-ITEM}
Element to be stored.
Return Value:
file-name - success
nil - failure
Example:
(sd-uwgm-element-store (sd-inq-curr-part))
Ulrich Blum
Creo Elements/Direct Modeling Lisp functions, which support interaction with Windchill Workgroup Manager are documented in solution https://www.ptc.com/appserver/cs/view/solution.jsp?n=CS123950.
Online Documetation will be added in Creo Elemenst/Direct Modeling 19.0 F000
The command (sd-uwgm-element-load file-name) works very well for 3D files (sdpc, sdac), but it doesn't work for 2D files (MI). Or is there some trick to do this?
Hello. I tested the command and I think that it doesn't work very well. It works only for 3d files (like for you) and it works only for files just added to the workspace (Article https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS196597). I would like something like API of Jlink in Creo Parametric. They open all files also in the common space.
I opened today a case (https://support.ptc.com/apps/case_logger_viewer/auth/ssl/case=13179021?from=logger) for have a spr about 2d files.
Hello!
Today PTC support created an Article and a SPR for issue about 2D files.
https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS242026&source=Case%20Viewer
https://support.ptc.com/appserver/cs/view/spr.jsp?n=5816768&source=Case%20Viewer
Hi,
And now fingers crossed that they find the problem. Well done Nicola.