AIberto Posted October 30, 2014 Share Posted October 30, 2014 ;;Get MAC add. (defun GetNetMac (/id lox serv wmiobj) (setq WMIobj (vlax-create-object "wbemScripting.SwbemLocator") serv (vlax-invoke WMIobj 'ConnectServer "." "\\root\\cimv2" "" "" "" "" 128 nil ) lox (vlax-invoke serv 'ExecQuery "SELECT * FROM Win32_NetworkAdapter" ) ) (vl-catch-all-apply (function (lambda () (vlax-for item lox (if (and (setq name (vlax-get item "Manufacturer")) (not (wcmatch name "Microsoft*,VMware*")) (setq id (vlax-get item "MACAddress")) ) (exit) ) ) ) ) ) (mapcar 'vlax-release-object (list lox serv WMIobj)) id ) ;;Get NET Time (defun net_time (/ http date) (setq http (vla-GetInterfaceObject *acad* "Microsoft.XMLHTTP") ) (vla-open http "Post" "http://fsxm.mjtd.com/datetime.php" :vlax-false );; (vlax-invoke-method http 'send); (while (/= (vlax-get-property http 'readystate) 4)) (setq date (vlax-get-property http 'responsetext)); (vlax-release-object http) (fx-replace (substr date 1 10) "-" "") ) (defun fx-replace (str old new / len po start) (setq len (strlen new)) (setq start 0) (while (setq po (vl-string-search old str start)) (setq str (vl-string-subst new old str po)) (setq start (+ po len)) ) str ) Quote Link to comment Share on other sites More sharing options...
BIGAL Posted October 31, 2014 Share Posted October 31, 2014 Moderator HUH ? Alberto what is your aim here by posting these lisps ? Would it not be better to just provide a list of every one you have and post it here with a description and link. Then people can decide if its usefull rather than what seems like random programs that you use, a lot of your recent posts do not appear to be your work. I have around 300+ programs but I dont randomly post them. Quote Link to comment Share on other sites More sharing options...
AIberto Posted October 31, 2014 Author Share Posted October 31, 2014 sorry for my poor english, what's this mean ? a lot of your recent posts do not appear to be your work. Quote Link to comment Share on other sites More sharing options...
hanhphuc Posted October 31, 2014 Share Posted October 31, 2014 a lot of your recent posts do not appear to be your work. If the codes are written by yourself is more meaningful to share. why not you give a try? (defun net_time ....) what's the usage of getting net time? we normally use this method: (rtos(getvar "cdate")2 0) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.