CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] ARKANCE | CONTACT - CZ | SK | EN | DE
Over 1.095.000 registered users (EN+CZ). AutoCAD tips, Inventor tips, Revit tips. Try the new precise Engineering calculator. New AutoCAD 2026 commands and variables.

CAD tip CAD tip # 14007:

Question

CAD 
 %  platform  category 
A
One of the limitations of the AutoLISP support in AutoCAD LT (2024 and higher) is the missing function which allows creating external objects - (vlax-create-object) (does not work and always returns nil in LT).

For some add-on applications you can circumvent this limitation by invoking the object creation function through the Windows interpreter for Microsoft HTML Applications - MSHTA.

This is e.g. a LISP code which invokes voice output from AutoCAD LT:

(setq sptext "Hello world")
(startapp (strcat "mshta.exe vbscript:close(CreateObject(\"Sapi.SpVoice\").Speak(\"" sptext "\",0))"))

Or better yet - this code copies the given, e.g. generated/computed text to Windows Clipboard in AutoCAD LT:

(setq cltext "Hello world!")
(startapp (strcat "mshta.exe vbscript:close(CreateObject(\"WScript.Shell\").Exec(\"clip\").stdIn.WriteLine(\"" cltext "\"))"))

More info - see Speak for AutoCAD.

ACLT2025ACLT2024
100% *CAD
26.1.2024    43026×   FAQ   Expert
applies to: AutoCAD LT 2025 · AutoCAD LT 2024 ·

See also:
Tip 14402:What is the difference between the BLOCKREPLACE, BREPLACE, REPLACEBLOCK, RIBLOCK and BLKREDEF commands?
Tip 14399:How can I find out which version of LISP freeware is loaded?
Tip 14316:How to redefine the HATCH command to start with the settings option?
Tip 14300:How to convert my DWG drawing to a hand-drawn, sketched appearance even in AutoCAD LT?
Tip 14085:JavaScript API support in AutoCAD and AutoCAD LT.


Back    All CAD Tips



Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD: 
OS: 
Categ: 
Text:
 FAQ
  



Featuring:
Publish interactive 3D PDF models from AutoCAD, Inventor or Revit with Share3D More info


Please use these tips at your own risk.
ARKANCE is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist