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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Translate the entire conversation x

[PTC Modeler] Copying token of a model element to clipboard

antoonsg
4-Participant

[PTC Modeler] Copying token of a model element to clipboard

Hello

In PTC Modeler 10.2, is there a way to copy to the clipboard the token so that it is ready to paste it in text fields? If not built-in, is it possible to write a script to do that?

 

The need is to replace drag-drop from pane to text that could be annoying with long panes.

The need is not to copy the model element but its token as used in text fields (like Description of requirements, ...)

 

I haven't any command in the IDE.

I looked at Automation API of model elements but haven't found any clipboard-related operations.

Dumping the content of the clipboard after copying a token gives internal info that is maybe not appropriate (as too much linled to internal PTC Modeler deisgn):

=== Available Clipboard Formats === [49161, 49293, 1, 16, 7, 13, 49171]
I guess PTC Modeler uses custom types [49161, 49293 and 49171] to store internal bytestream representation of the token that could be pasted.

 

Thank you for your support

1 REPLY 1
antoonsg
4-Participant
(To:antoonsg)

Thinking again on this topic, considering the content of the clipboard, I tested a simple:

1. copy/CTRL+C of the model element

2. paste/CTRL+V in a text field

... and it works as expected: a token is created in the text field.

Announcements

Top Tags