[Search tip detail and code files using keywords, tip number, author name, etc ]
 
Recreate INITDIA for AutoLISP
Tip# 4031 By Leonid Nemirovsky On 10-Dec-2012
0
Rated By 0 users
Categories : LISP Code Modules, Misc. User Tools
Software type : AutoCAD 2013
Rename File To : No Files to download.
Replace the variable in newer versions of AutoCAD.

Veteran tipster Leonid Nemirovsky shares a tip about using the INITDIA variable in AutoCAD-based LISP routines.

"In AutoCAD 2012, the variable INITDIA no longer exists, but I found a replacement on the AutoCAD forum. You can use the CUI (Customize User Interface) Editor to create a new command for writing AutoLISP routines.

"A standard dialog box will not appear as it did in previous versions (before AutoCAD 2012). Here is a routine you can use instead:

     (defun c:hh ()
     (initcommandversion 2)
     (command "hatch" "t")
     (princ)
     (exit)
     )

Notes from Cadalyst Tip Reviewer Brian Benton: INITDIA is an AutoLISP function that forces the display of the next command’s dialog box. Evidently it was removed in AutoCAD 2012, and the tipster has shown how to update your LISP routines to work in the newer releases of AutoCAD.

 

Average Rating:
0


User comments
Comment by DeShawn,Bill
Posted on 2012-12-10 20:25:36
Good tip!
Comment by DeShawn,Bill
Posted on 2012-12-10 20:33:51
Leonid: using !initdia it submits a subroutine number. I never installed 2012, so I don't know if that works the same. So, I'm wondering if initdia was reinstated for AutoCAD 2013. !initcommandversion is also there in ACAD2013


Log In