+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Forum Newbie
    Using
    AutoCAD 2012
    Join Date
    Aug 2011
    Posts
    4

    Default Block insertion not working same in ACAD 2012 vs 2011

    Registered forum members do not see this ad.

    The attached lisp routine worked perfectly in AutoCAD 2011 but acts a bit strange in 2012. It will strill bring in the block but it won't bring up the attribute dialog box correctly as before. I have to hit enter through all the attributes instead of just using the dialog box.
    Can someone smarter than me figure out what may be happening with this routine in AutoCAD 2012 now?
    Thank you,
    Keith
    Attached Files

  2. #2
    Junior Member
    Using
    AutoCAD 2011
    Join Date
    Aug 2011
    Location
    So Cal, USA
    Posts
    10

    Love

    kabcad; I haven't tested your routine, but it sounds an awful lot like you need to change a setting in your drawing ATTDIA to be 1, that same thing happens to me in 2002 when my dialog boxes are suppressed by that variable. When ATTDIA is set to 0, you have to manually enter your block attributes at the prompt. (I didn't double check the name of the attribute dialogue variable, I don't have time, but you can dig for it if I got the wrong one.). Good luck.
    Last edited by Cherilm; 16th Aug 2011 at 01:33 am. Reason: to add

  3. #3
    Forum Newbie
    Using
    AutoCAD 2012
    Join Date
    Aug 2011
    Posts
    4

    Default

    Thanks but I did check that variable and it is set to 1 already. If I bring the block in using the basic insert command, it works like it should (dialog box appears) but using my lisp routine is does not.

  4. #4
    Junior Member
    Using
    AutoCAD 2011
    Join Date
    Aug 2011
    Location
    So Cal, USA
    Posts
    10

    Default

    Okay, and also I am still in 2002, we have 2011 but we have no need to migrate to it. It looks like I may do so soon because it does have some cool features the previous versions don't.

    And it just occurred to me, maybe something in your routine is changing that variable back to '0'. Just a thought.

  5. #5
    Super Moderator SLW210's Avatar
    Computer Details
    SLW210's Computer Details
    Operating System:
    Windows 7 PRO
    Computer:
    IBM Lenovo
    Motherboard:
    ACPI x86
    CPU:
    Pentium(R) Dual-Core CPU E5500 @ 2.80GHz
    RAM:
    4 GB RAM
    Graphics:
    Nvidia Quadro 600 1GB
    Primary Storage:
    300 GB
    Secondary Storage:
    650GB
    Monitor:
    ThinkVision 22"
    Discipline
    Multi-disciplinary
    SLW210's Discipline Details
    Occupation
    Design Draftsman
    Discipline
    Multi-disciplinary
    Details
    Mostly do drafting related to manufacturing. From doing site layouts with proposed updates, additions and renovations to be budgeted and submitted for bid, to updating and changing existing drawings to reflect maintenance and repair/revision work done on site.
    Using
    AutoCAD 2011
    Join Date
    May 2007
    Location
    South Florida, USA
    Posts
    9,106

    Default

    See if ATTREQ = 1.
    “A narrow mind and a fat head invariably come on the same person” Zig Zigler



  6. #6
    Senior Member kruuger's Avatar
    Computer Details
    kruuger's Computer Details
    Operating System:
    Xp 64bit
    Using
    AutoCAD 2010
    Join Date
    Dec 2007
    Location
    Poland
    Posts
    181

    Default

    i guess there is a bug with ATTREQ in 2012.
    when you insert your block try this:
    Code:
    (command "_.ddedit" (entlast))
    k.

  7. #7
    Forum Newbie
    Using
    AutoCAD 2012
    Join Date
    Aug 2011
    Posts
    4

    Default

    Quote Originally Posted by kruuger View Post
    i guess there is a bug with ATTREQ in 2012.
    when you insert your block try this:
    Code:
    (command "_.ddedit" (entlast))
    k.
    k-
    Where would I insert this line of code within my lisp routine?
    thanks.
    kb

  8. #8
    Senior Member kruuger's Avatar
    Computer Details
    kruuger's Computer Details
    Operating System:
    Xp 64bit
    Using
    AutoCAD 2010
    Join Date
    Dec 2007
    Location
    Poland
    Posts
    181

    Default

    Quote Originally Posted by kabcad View Post
    k-
    Where would I insert this line of code within my lisp routine?
    thanks.
    kb
    try this:
    Code:
    (defun c:BU (/ *error* CE VL OV)
      (defun *error* (Msg)
        (if
          (= 8 (logand 8 (getvar "UNDOCTL")))
          (command "._undo" "_e")
        )
        (if (not (member MSG '("Function cancelled" "quit / exit abort")))
          (princ (strcat "\nError: " MSG))
        )
        (mapcar 'setvar VL OV)
        (setvar "CMDECHO" CE)
        (princ)
      )
      (setq CE (getvar "CMDECHO"))
      (setvar "CMDECHO" 0)
      (command "._undo" "_be")
      (setq VL (list "ATTDIA" "ATTREQ" "CLAYER" "DIMSCALE" "ORTHOMODE")
            OV (mapcar 'getvar VL)
      )
      (command "._layer" "_m" "DETCUT" "_c" 4 "" "")
      (setvar "ATTDIA" 1)
      (setvar "ATTREQ" 1)
      (setvar "ORTHOMODE" 1)
      (princ "\nInsertion point: ")
      (command "._insert" "BUB" "_s" (/ (getvar "DIMSCALE") 96.) "_r" pause pause)
      (while (/= (getvar "CMDNAMES") "")
        (command pause)
      )
      (command "_.ddedit" (entlast))
      (command)
      (command "._undo" "_e")
      (mapcar 'setvar VL OV)
      (setvar "CMDECHO" CE)
      (princ)
    )
    (princ)
    k.

  9. #9
    Forum Newbie
    Using
    AutoCAD 2012
    Join Date
    Aug 2011
    Posts
    4

    Default

    Registered forum members do not see this ad.

    Quote Originally Posted by kruuger View Post
    try this:
    Code:
    (defun c:BU (/ *error* CE VL OV)
    (defun *error* (Msg)
    (if
    (= 8 (logand 8 (getvar "UNDOCTL")))
    (command "._undo" "_e")
    )
    (if (not (member MSG '("Function cancelled" "quit / exit abort")))
    (princ (strcat "\nError: " MSG))
    )
    (mapcar 'setvar VL OV)
    (setvar "CMDECHO" CE)
    (princ)
    )
    (setq CE (getvar "CMDECHO"))
    (setvar "CMDECHO" 0)
    (command "._undo" "_be")
    (setq VL (list "ATTDIA" "ATTREQ" "CLAYER" "DIMSCALE" "ORTHOMODE")
    OV (mapcar 'getvar VL)
    )
    (command "._layer" "_m" "DETCUT" "_c" 4 "" "")
    (setvar "ATTDIA" 1)
    (setvar "ATTREQ" 1)
    (setvar "ORTHOMODE" 1)
    (princ "\nInsertion point: ")
    (command "._insert" "BUB" "_s" (/ (getvar "DIMSCALE") 96.) "_r" pause pause)
    (while (/= (getvar "CMDNAMES") "")
    (command pause)
    )
    (command "_.ddedit" (entlast))
    (command)
    (command "._undo" "_e")
    (mapcar 'setvar VL OV)
    (setvar "CMDECHO" CE)
    (princ)
    )
    (princ)
    k.
    Kruuger,
    Thank you very much for your effort on this. I tried this code and it worked but the one thing that is different than before is that it brings up the attribute EDITOR dialog box instead of the attribute INPUT dialog box. Does that make sense? I already have the attributes defined in the BUB.dwg block so all I need to do is change the values once the block gets inserted into the drawing (detail cut number and sheet number).
    Thank you again for helping me with this...
    Keith

Similar Threads

  1. Metric Block Scale Insertion Issues ACAD 2012
    By jrg in forum AutoCAD 2D Drafting, Object Properties & Interface
    Replies: 2
    Last Post: 29th Jun 2011, 01:05 pm
  2. express tool commands are not working in 2012 pls help me
    By afrazawan in forum AutoCAD General
    Replies: 13
    Last Post: 17th May 2011, 03:07 pm
  3. MEP 2011 vs 2012
    By Blam in forum MEP
    Replies: 2
    Last Post: 17th May 2011, 12:55 pm
  4. Simpson Pull Down Menu not Working in ACAD 2011
    By rwhitt0724 in forum The CUI, Hatches, Linetypes, Scripts & Macros
    Replies: 3
    Last Post: 19th Oct 2010, 09:43 pm
  5. Initializing...no function definition: VLAX-GET-ACAD-OBJECT (ACAD 2011)
    By theonlydanny in forum AutoLISP, Visual LISP & DCL
    Replies: 2
    Last Post: 22nd Sep 2010, 08:53 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts