Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/28/2025 in Posts

  1. Sorry even i am away until 9 july. However thanks for your help .
    1 point
  2. @SLW210 Yes, these scripts are LT friendly. Cheers for making Cadtutor a great forum. @Steven P Thank you Steven for your input, I'm eager to give it a try. Over the past few weeks, I couldn't get the v-lax routines to work, I came to the conclusion it was an LT limitation. But your code looks different, I will try yours the next time I'm in the office, which is sometime next week. (Long weekend for me up here in Canada ) In my haste, I made a mistake. The scripts below, Q1 and Q2, just add the dwgname and full path with name to the clipboard respectively that's it. The P0 and P9 do the same but also call the plot dialog box automatically for the user. I won't re-add the P scripts, see above. To verify: Q1 - adds dwgname to the clipboard Q2 - adds dwgprefix + dwgname to the clipboard P0 - adds dwgname to the clipboard and calls the plot dialog P9 - adds dwgprefix + dwgname to the clipboard and calls the plot dialog Have a great weekend. Q1.lsp Q2.lsp
    1 point
  3. Sorry for the delay 'real' work got in the way : ) Dang .. I can't get an animated GIF to load at the moment:
    1 point
  4. USB: I have the below from RJP. Send an e-mail. There are 2 LISPs below, the first c:sendmail describes the process and the second is a function I call to send e-mails via LISP (usually sending PDFs). Create a little LISP that will return to whatever unique number you want, after that use the below to send you an e-mail with the unique code in - this can be done in the background using Outlook ('send' needs to be 'T'). At your leisure you can put that number into your master LISP, compile it and send the LISP back again for the end user to copy where they want. (rjp-OutlookMessage (<<YOUR-E-MAIL>> "Computer Code" "" <<UNIQUE-CODE>> T) T might need to be "T" Removes the need for you to take the USB to the users desk. ;;http://www.theswamp.org/index.php?topic=26953.msg324794#msg324794 ;;email a file ;;Usage (defun c:sendemail () ; test and example e-mail (rjp-OutlookMessage ;;email address (multiple separated by semicolon) "Some.One@e-mail.com;someone.else@e-mail.com" ;;Subject "Test Email" ;;Attachments as a list of strings '("C:\\Users\\SO123456\\Working Drawings\\ADrawing.pdf") ;;Text in body of email "Nothing to read here :)" ;;nil will open email to edit...T will send email in the background nil ) ) (defun rjp-OutlookMessage (To Subject AttachmentList Body Send / objMail objOL) (if (and (setq objOL (vlax-get-or-create-object "Outlook.Application")) (setq objMail (vlax-invoke-method objOL 'CreateItem 0)) ) (progn (vlax-put objMail 'To To) (vlax-put objMail 'Subject Subject) (vlax-put objMail 'Body Body) (foreach file AttachmentList (vl-catch-all-apply 'vlax-invoke (list (vlax-get objMail 'Attachments) 'Add file ) ) ) (if send (vlax-invoke objMail 'Send) (vlax-invoke objMail 'Display :vlax-true) ) (vlax-release-object objOL) (vlax-release-object objMail) ) ) (princ) ) Second thought for today, how much risk is there to send the LISP out without any protection in the form of computer codes ad so on? For example, all of mine are done on company time, their property and happy to freely share within the company. What I post here I put down to 'learning time' (always learning)... a lot of the users of this thread are the same with little commercial or sensitive info in the LISP... so... what is the risk and do you need to do any more than just compile the code (and even compile the code... do you need to do that)?
    1 point
  5. This returns the serial number of the motherboard. It is more unique than the hard drive's serial number and also more unique than the variant of this same function that uses "Select * from Win32_BaseBoard". (defun obt_UUID (/ LObj SObj OSObj UUID) (setq LObj (vlax-create-object "WbemScripting.SWbemLocator") SObj (vlax-invoke LObj 'ConnectServer nil nil nil nil nil nil nil nil) OSObj (vlax-invoke SObj 'ExecQuery "SELECT UUID FROM Win32_ComputerSystemProduct") ) (vlax-for Obj OSObj (setq UUID (vlax-get Obj 'UUID)) ) (foreach Obj (list LObj SObj OSObj) (and Obj (vlax-release-object Obj)) ) UUID ) This might be a good option if you want your program to continue working when the user changes their hard drive but not their motherboard.
    1 point
×
×
  • Create New...