Jump to content

Search the Community

Showing results for tags '*error*'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • CADTutor
    • News, Announcements & FAQ
    • Feedback
  • AutoCAD
    • AutoCAD Beginners' Area
    • AutoCAD 2D Drafting, Object Properties & Interface
    • AutoCAD Drawing Management & Output
    • AutoCAD 3D Modelling & Rendering
    • AutoCAD Vertical Products
    • AutoCAD LT
    • CAD Management
    • AutoCAD Bugs, Error Messages & Quirks
    • AutoCAD General
    • AutoCAD Blogs
  • AutoCAD Customization
    • The CUI, Hatches, Linetypes, Scripts & Macros
    • AutoLISP, Visual LISP & DCL
    • .NET, ObjectARX & VBA
    • Application Beta Testing
    • Application Archive
  • Other Autodesk Products
    • Autodesk 3ds Max
    • Autodesk Revit
    • Autodesk Inventor
    • Autodesk Software General
  • Other CAD Products
    • BricsCAD
    • SketchUp
    • Rhino
    • SolidWorks
    • MicroStation
    • Design Software
    • Catch All
  • Resources
    • Tutorials & Tips'n'Tricks
    • AutoCAD Museum
    • Blocks, Images, Models & Materials
    • Useful Links
  • Community
    • Introduce Yourself
    • Showcase
    • Work In Progress
    • Jobs & Training
    • Chat
    • Competitions


  • Programs and Scripts
  • 2D AutoCAD Blocks
  • 3D AutoCAD Blocks
  • Images
    • Backgrounds

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...

Found 1 result

  1. I have been getting this error in autocad 2015 but not in 2014 for some reason. Cannot invoke (command) from *error* without prior call to (*push-error-using-command*). Converting (command) calls to (command-s) is recommended. Can anybody please help me understand what this means? I have been using this code from Afralisp (defun c:drawline () ;define function (initerr) ;intit error (setvar "cmdecho" 0) ;reset variables (setvar "osmode" 32) (command "undo" "m") ;set mark (setq pt1 (getpoint "\nPick First Point: ")) ;get points (setq pt2 (getpoint pt1 "\nPick Second Point: ")) (command "LAYER" "M" "2" "") ;change layer (command "Line" pt1 pt2 "") ;draw line (setq pt3 (getpoint pt2 "\nPick Third Point: "));get 3rd point (setvar "osmode" 0) ;reset snap (command "Line" pt2 pt3 "") ;draw line (reset) ;reset variables (princ) ) (defun error() ;load function (prompt "\nGlobal Error Trap Loaded") ;inform user (princ) );defun ;;;*========================================================== (defun initerr () ;init error (setq oldlayer (getvar "clayer")) ;save settings (setq oldsnap (getvar "osmode")) (setq oldpick (getvar "pickbox")) (setq temperr *error*) ;save *error* (setq *error* trap) ;reassign *error* (princ) );defun ;;;*=========================================================== (defun trap (errmsg) ;define trap (command nil nil nil) (if (not (member errmsg '("console break" "Function Cancelled")) ) (princ (strcat "\nError: " errmsg)) ;print message ) (command "undo" "b") ;undo back (setvar "clayer" oldlayer) ;reset settings (setvar "blipmode" 1) (setvar "menuecho" 0) (setvar "highlight" 1) (setvar "osmode" oldsnap) (setvar "pickbox" oldpick) (princ "\nError Resetting Enviroment ") ;inform user (terpri) (setq *error* temperr) ;restore *error* (princ) );defun ;;;*=========================================================== (defun reset () ;define reset (setq *error* temperr) ;restore *error* (setvar "clayer" oldlayer) ;reset settings (setvar "blipmode" 1) (setvar "menuecho" 0) (setvar "highlight" 1) (setvar "osmode" oldsnap) (setvar "pickbox" oldpick) (princ) );defun You can find the code here: http://www.afralisp.net/autolisp/tutorials/error-trapping.php
  • Create New...