cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Translate the entire conversation x

Creo Elements annotation Windchill Name in drawing browser

Gerard_Moba
11-Garnet

Creo Elements annotation Windchill Name in drawing browser

I went from Creo Elements 20.4 with Workgroup manager 12 to Creo Elements 20.6.2 with workgroup manager 13.0.2.1

In the drawing browser, the name of the drawing used to be the Windchill file name, and now it is the Windchill name.
Is it possible to change it to the windchill number or file name?

Gerard_Moba_0-1744115254543.png
I used to use it in a lisp, for example:

display (oli::sd-am-inq-drawing-no)
But now I get a different value then I used to.
Also I can't find how to get the windchill attributes (like PTC_WM_NUMBER) of the drawing in lisp.
I tried lot's of things but I can't find it.

 

3 REPLIES 3

It seems that the display of the file name was a bug and the name should be shown in Creo Elements annotation:
PTC Support article CS412824

Release note Workgroup manager "DisplayNameInAnnotation"


In that case my question is more focused on the second part.
I had this code in sd_avail_cmds.cmd:

(:Application "Annotation")

(:Group "Custom" :title "Custom")

("Copy drawing number to clipboard"
 :title       "Copy drawing number to clipboard"
 :action      "(setf Part_number (oli::sd-am-inq-drawing-no))
(unless (equal (search \".\" Part_number) nil)
(setf Part_number_reverse (reverse Part_number))
(setf Part_number (reverse (subseq Part_number_reverse (+ (search \".\" Part_number_reverse) 1) (length (reverse Part_number)) ))))
(sd-sys-exec (format nil \"echo ~a|clip\" Part_number))"
 :description "Drawing number to clipboard"
 :image       "SolidDesigner/Edit/copy" 
 :ui-behavior :DEFAULT)

It lets me copy the drawing number to the clipboard so I can paste it and search it easily in my web browser where I have multiple Windchill tabs open. Or paste it in a mail or something. (for us the drawing number is the same as the file name)
But now the name is copied to the clipboard.

I tried a few things but can't get it to work
This displays the number of the current model:

display (oli::sd-uwgm-inq-system-attribute (sd-inq-curr-part) "PTC_WM_NUMBER")

So I thought this should display the number of the current drawing:

display (oli::sd-uwgm-inq-system-attribute (sd-am-inq-curr-sheet) "PTC_WM_NUMBER")

But the sheet is not the same as the drawing.
How do I select the drawing? or at least, how do I get the PTC_WM_NUMBER of the drawing?


Hi @Gerard_Moba 

Thank you for your question. 

Your post appears well documented but has not yet received any response. I am replying to raise awareness. Hopefully, another community member will be able to help.

Also, feel free to add any additional information you think might be relevant. It sometimes helps to have screenshots to better understand what you are trying to do.

 

Best regards,


Catalina
PTC Community Moderator
PTC

Your 'reverse' approach looked funny to me. But you've found a solution. 👍

Here are 2 other possibilities:

;; looking for the last dot by using :from-end option:
(let* ((Part_number (oli::sd-am-inq-drawing-no)) (last-dot (position #\. Part_number :from-end T)))
  (uib::WIN-COPY-STRING-TO-CLIPBOARD (subseq Part_Number 0 last-dot)))
 
;; assuming .mi is the extension
(uib::WIN-COPY-STRING-TO-CLIPBOARD (oli::sd-string-replace (oli::sd-am-inq-drawing-no) ".mi" ""))

 

There is no support for Annotation by PTC for the Integration Kit functions sd-uwgm-set/inq-*  as mentioned in the documentation.  Again: there is NONE.

Those function can only handle sel-items of 3D Objects like parts, assemblies, workplanes etc. .

Announcements

Top Tags