| Author |
Message |
Larry Leuallen
Guest
|
Posted:
Tue Jan 11, 2005 9:04 am Post subject:
Re: Data to Calculator or other program |
|
|
TCEBob wrote:
| Quote: | I'll be glad to supply examples. But, really, my original need was to
pick a text object and stow the string into the clipboard. The
business about picking points may be adding more complexity than I
had in mind. There's no magic in pipes or civil calculating in
general; just distance, slope, etc.
rs
|
Understood. I thought you were picking distances from geometry which is
what the program I proposed does.
For getting numbers from text, I knocked up a little function and have
posted it Customer files. It is called GetTextNumber.zip.
Hope you get this post and can use the function. Requires DosLib.
Function: GTN - GetTextNumbers
Select an entity which contains text and a number(s) that you wish to
copy to the clipboard. Function tested with Text, Mtext, Dimensions,
and Qleader. When selecting from a Qleader, select the text portion.
Functions scans text and retrieves legally formatted numbers contained
in the text. If there is only one number, the number is placed
immediately on the clipboard. If there is more than one number, a dialog
box is displayed containing the numbers in their original format. Select
one of the numbers and it is placed on the clipboard.
Numbers are placed on the clipboard in decimal format suitable for use
with a calculator.
Larry
|
|
| Back to top |
|
 |
krispy
Guest
|
Posted:
Tue Jan 11, 2005 10:05 am Post subject:
Re: Data to Calculator or other program |
|
|
in VBA::
| Code: |
Dim textObj As DataObject
Set textObj = New DataObject
textObj.SetText "put text here"
textObj.PutInClipboard
|
or in a LISP hack:
| Code: |
(defun c:clipboardTest()
(command ".vbastmt"
"Set textObj = New DataObject"
".vbastmt"
"textObj.SetText \"put text here\""
".vbastmt"
"textObj.PutInClipboard"
);command
(princ)
)
|
|
|
| Back to top |
|
 |
TCEBob
Guest
|
Posted:
Tue Jan 11, 2005 10:10 pm Post subject:
Re: Data to Calculator or other program |
|
|
Thanks, Larry. I have DosLib and will use it if necessary, but it's unwieldy to
circulate a small lisp routine with a whole library. I'd rather have code if I
can figure it out. Can't one sneak bits of visual basic into lisp?
rs
"Larry Leuallen" <leuallen@comcast.net> wrote in message
news:41e350a4$1_2@newsprd01...
| Quote: | TCEBob wrote:
I'll be glad to supply examples. But, really, my original need was to
pick a text object and stow the string into the clipboard. The
business about picking points may be adding more complexity than I
had in mind. There's no magic in pipes or civil calculating in
general; just distance, slope, etc.
rs
Understood. I thought you were picking distances from geometry which is
what the program I proposed does.
For getting numbers from text, I knocked up a little function and have
posted it Customer files. It is called GetTextNumber.zip.
Hope you get this post and can use the function. Requires DosLib.
Function: GTN - GetTextNumbers
Select an entity which contains text and a number(s) that you wish to
copy to the clipboard. Function tested with Text, Mtext, Dimensions,
and Qleader. When selecting from a Qleader, select the text portion.
Functions scans text and retrieves legally formatted numbers contained
in the text. If there is only one number, the number is placed
immediately on the clipboard. If there is more than one number, a dialog
box is displayed containing the numbers in their original format. Select
one of the numbers and it is placed on the clipboard.
Numbers are placed on the clipboard in decimal format suitable for use
with a calculator.
Larry |
|
|
| Back to top |
|
 |
TCEBob
Guest
|
Posted:
Tue Jan 11, 2005 10:17 pm Post subject:
Re: Data to Calculator or other program |
|
|
Ok, PutInClipboard is a routine available in VBA, I take it. I will now read up
on VBA.
Thanks
rs
"krispy" <nospam@address.withheld> wrote in message
news:18263860.1105420306331.JavaMail.jive@jiveforum2.autodesk.com...
| Quote: | in VBA::
| Code: |
Dim textObj As DataObject
Set textObj = New DataObject
textObj.SetText "put text here"
textObj.PutInClipboard
|
or in a LISP hack:
| Code: |
(defun c:clipboardTest()
(command ".vbastmt"
"Set textObj = New DataObject"
".vbastmt"
"textObj.SetText \"put text here\""
".vbastmt"
"textObj.PutInClipboard"
);command
(princ)
)
|
|
|
|
| Back to top |
|
 |
|
|
|
|