Clipboard Copy

Clipboard Copy

k005
Advisor Advisor
575 Views
6 Replies
Message 1 of 7

Clipboard Copy

k005
Advisor
Advisor

Hi All,

 

578.6
25.6
603.9
715.6

 

In this way, how can I select numbers (Text) objects and transfer them to the Clipboard in the same order?, replacing the dots with commas and adding the expressions equal and /1000 to the memory in the same order.

 

=578,6/1000
=25,6/1000
=603,9/1000
=715,6/1000

 

 

* Doslib is installed on my system...

 

 

 

 

 

 

0 Likes
576 Views
6 Replies
Replies (6)
Message 2 of 7

komondormrex
Mentor
Mentor

select texts, sort 'em down Y, make of 'em required mtext and copy mtext textstring to the clipboard either way.

0 Likes
Message 3 of 7

hak_vz
Advisor
Advisor

@k005 

 

1)  use command strcat on each on text segments to add = and / 1000

2) use vl-string-subst to convert comma symbol

3) use command (express tool) TXT2MTXT to convert all texts to single multi-line mtext object

4) enter mtext edit mode, select all texts and copy to clipboard to transfer to other programs or whatever you need.

Steps 1 to 3 are lisp coded in 3 lines of code.

It's time to see your code. Can be done in no more than 3 lines of code.

 

Miljenko Hatlak

EESignature

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
0 Likes
Message 4 of 7

k005
Advisor
Advisor

@komondormrex 

@hak_vz 

 

Thank you.

0 Likes
Message 5 of 7

k005
Advisor
Advisor

**************************** THIS ISSUE HAS BEEN RESOLVED.  C# *****************************

Message 6 of 7

Sea-Haven
Mentor
Mentor

After copyclip what then to Excel ? You can write to the clipboard so no need to use the pick text and copy. 

 

Ok to paste into excel as separate cells need something like this note the Cr.

 

(setq str (strcat "A" (chr 13) "B" (chr 13) "C" (chr 13) "D"))
(vlax-invoke
    (vlax-get (vlax-get (vlax-create-object "htmlfile") 'ParentWindow) 'ClipBoardData)
    'setData
    "TEXT"
    str
)

 

 Mtext will give A\PB\PC\PD in one cell, similar with using \n.

SeaHaven_0-1700787331887.png

 

Message 7 of 7

k005
Advisor
Advisor

Thanks for the suggestion.


This was about pasting the result obtained by dividing the weights in the iron quantity by 1000 into Excel. I managed to add it as a parameter to a section in my program that I prepared before.

 

 

0 Likes