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 1 Quote
Saxlle Posted Saturday at 07:32 AM Posted Saturday at 07:32 AM You can also try with showhtmlmodalwindow. 1 Quote
p7q Posted Monday at 08:40 AM Author Posted Monday 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 Monday at 09:26 AM Posted Monday 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 Monday at 09:29 AM by GLAVCVS Quote
BIGAL Posted yesterday at 12:03 AM Posted yesterday at 12:03 AM 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 20 hours ago Posted 20 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 17 hours ago Posted 17 hours 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
Lee Mac Posted 14 hours ago Posted 14 hours ago LT does support ActiveX/COM, but cannot interface with objects outside of the AutoCAD Object Model. 1 Quote
BlackBox Posted 14 hours ago Posted 14 hours ago 3 minutes ago, Lee Mac said: LT does support ActiveX/COM, but cannot interface with objects outside of the AutoCAD Object Model. Thanks for the clarification, my friend. Quote
Tharwat Posted 14 hours ago Posted 14 hours ago @BlackBox I am glad to see you contributing once again in all around similar forums. It's been a long time indeed. 1 Quote
BlackBox Posted 14 hours ago Posted 14 hours ago Thanks, @Tharwat! We had a child, who's about to start kindergarten in a few weeks, we've moved, we have new jobs... so my priorities are (I am) different. Cheers 1 Quote
Tharwat Posted 12 hours ago Posted 12 hours ago @BlackBox I sent you a PM to keep this thread related to its aim. 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.