CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 4774

CAD tip CAD tip # 13307:

   
Question CAD 
 %  platform  category 
Q - question

How to teach AutoCAD Web app a new command?

A - answer If you are missing a command in the web version of AutoCAD (web.autocad.com), you can easily add it (or have it added) using AutoLISP.

For example, you can easily replace the currently missing SNAPANG variable control (in fact any variable control) used to rotate the cursor when drafting, by adding a simple LISP application.

Save the following LISP code into the Snapang.lsp file and upload this file in your web-based AutoCAD using "Manage LISP...". Set it to run at startup so that the new "SNAPANG" command is defined next time you start your web AutoCAD. You can then run it at any time by typing SNAPANG at the command prompt.

(defun C:SNAPANG ()
 (initget 1)
 (setvar "SNAPANG" (getangle "New snap angle: "))
)

As in the desktop version of AutoCAD, you can "pick" the angle by pointing two points in the drawing or enter it numerically (in the current angle units of your drawing).

Or an alternative, if you prefer more prompts for picking the angle:

(defun C:SNAPANG ( / p1 p2)
 (setq p1 (getpoint "Start point for snap angle : "))
 (if p1 (setq p2 (getpoint p1 "End point: ")))
 (setvar "SNAPANG" (if p1 (angle p1 p2) 0.0))
)

ACADweb
100% *  CAD 
25.4.2022    1219×  
Prices - CAD eShop:
applies to: ACADweb ·

See also:
Tip 13653:FPoly - draw fixed-length polylines in AutoCAD.
Tip 13633:How to run Revit, Inventor or Windows version of AutoCAD on macOS?
Tip 13615:Associative angle bisector in an AutoCAD DWG drawing.
Tip 13607:Adding the block editor to AutoCAD Web app.
Tip 13597:How to convert RGB color to Pantone, RAL, AutoCAD ACI, CMYK or vice versa?


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 glossary   



Featuring:
Automatic nesting of 2D parts on rectangular sheets in AutoCAD
AutoNEST 2008 More info


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