Data to Calculator or other program
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Data to Calculator or other program
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization
Author Message
Larry Leuallen
Guest





Posted: Tue Jan 11, 2005 9:04 am    Post subject: Re: Data to Calculator or other program Reply with quote

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 Reply with 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
TCEBob
Guest





Posted: Tue Jan 11, 2005 10:10 pm    Post subject: Re: Data to Calculator or other program Reply with quote

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 Reply with quote

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
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB