Skip to main content
14-Alexandrite
March 18, 2014
Question

Create and publish/share lisp functions vs Windchill. In particular "open file" by CADName.

  • March 18, 2014
  • 7 replies
  • 3071 views

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


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.

7 replies

1-Visitor
March 27, 2014

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.

ngiacom14-AlexandriteAuthor
14-Alexandrite
March 28, 2014

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


13-Aquamarine
April 3, 2014

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

12-Amethyst
June 21, 2016

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?

ngiacom14-AlexandriteAuthor
14-Alexandrite
July 13, 2016

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.

ngiacom14-AlexandriteAuthor
14-Alexandrite
July 14, 2016
12-Amethyst
July 15, 2016

Hi,

And now fingers crossed that they find the problem. Well done Nicola.