p7q Posted Thursday at 11:14 AM Posted Thursday at 11:14 AM Hi, Is it possible to make API (web) calls using AutoLISP that work in both AutoCAD and AutoCAD LT? If not, what is the recommended workaround for AutoCAD LT? Thanks in advance! Quote
GLAVCVS Posted Thursday at 12:18 PM Posted Thursday at 12:18 PM (edited) Hi I guess a necessary question is: which API calls? If you want to access the web, look for information about XMLHTTP Edited Thursday at 12:27 PM by GLAVCVS Quote
BIGAL Posted Friday at 02:32 AM Posted Friday at 02:32 AM (edited) Do a google lots of code out there can be as simple as. (command "browser" "https://maps.google.com.au" ) ; opera house -33.8567844,151.213108,17z (command "browser" "https://www.google.com.au/maps/@-33.8567844,151.213108,17z") Not tested in LT. Works in Bricscad. Edited Friday at 02:32 AM by BIGAL Quote
Saxlle Posted Saturday at 07:32 AM Posted Saturday at 07:32 AM You can also try with showhtmlmodalwindow. Quote
p7q Posted yesterday at 08:40 AM Author Posted yesterday at 08:40 AM On 6/26/2025 at 3:18 PM, GLAVCVS said: Hi I guess a necessary question is: which API calls? If you want to access the web, look for information about XMLHTTP (setq webObj (vlax-invoke-method (vlax-get-acad-object) 'GetInterfaceObject "WinHttp.WinHttpRequest.5.1")) (vlax-invoke-method webObj 'Open "GET" strUrl :vlax-false) (setq errobj (vl-catch-all-apply 'vlax-invoke-method (list webObj 'Send))) This code not working in AutoCAD LT. Quote
GLAVCVS Posted yesterday at 09:26 AM Posted yesterday at 09:26 AM (edited) 48 minutes ago, p7q said: (setq webObj (vlax-invoke-method (vlax-get-acad-object) 'GetInterfaceObject "WinHttp.WinHttpRequest.5.1")) (vlax-invoke-method webObj 'Open "GET" strUrl :vlax-false) (setq errobj (vl-catch-all-apply 'vlax-invoke-method (list webObj 'Send))) This code not working in AutoCAD LT. Why doesn't 'strUrl' work? Make sure that variable contains a valid URL. Edited yesterday at 09:29 AM by GLAVCVS Quote
BIGAL Posted 14 hours ago Posted 14 hours ago Lt may not support "GetInterfaceObject", it is not a full lisp version lots of stuff does not work. @p7q did you try what I posted ? 1 Quote
SLW210 Posted 3 hours ago Posted 3 hours ago Good stuff. Here is an older example using JSON... https://github.com/diegomcas/autolisp-web-and-json-utils Here is rundown on LT limitations... https://www.cadforum.cz/en/limitations-of-the-lisp-language-autolisp-visuallisp-autocad-lt-tip13683 IIRC you need ActiveX or other things that LT is lacking to make API calls, I hope I am proven wrong though. Quote
BlackBox Posted 32 minutes ago Posted 32 minutes ago 13 hours ago, BIGAL said: Lt may not support "GetInterfaceObject", it is not a full lisp version lots of stuff does not work. @p7q did you try what I posted ? 2 hours ago, SLW210 said: Good stuff. Here is an older example using JSON... https://github.com/diegomcas/autolisp-web-and-json-utils Here is rundown on LT limitations... https://www.cadforum.cz/en/limitations-of-the-lisp-language-autolisp-visuallisp-autocad-lt-tip13683 IIRC you need ActiveX or other things that LT is lacking to make API calls, I hope I am proven wrong though. You're both correct; LT now supports AutoLISP (not Visual LISP / COM). Not sure if it even supports Autoloader. I have a customer who paid for one of my Autodesk Exchange store apps, used it for years and now his employer downgraded everyone from full AutoCAD to LT. I had offered to write a (slower but functional) Visual LISP variant of the app they purchased, but no worky. Cheers Quote
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.