Jump to content

Recommended Posts

Posted

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!

Posted (edited)

Hi
I guess a necessary question is: which API calls?

If you want to access the web, look for information about XMLHTTP

Edited by GLAVCVS
Posted (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 by BIGAL
Posted
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. 

Posted (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 by GLAVCVS
Posted

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 ?

  • Like 1
Posted
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

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...