PDA

View Full Version : 2012 AutoCAD 2012 Enter Attribute Box Gone



matthew.159401
2011-05-16, 07:33 PM
Please help! I know this is a AutoCAD 2011 forum but I am unsure of where I should post this. Since installing AutoCAD 2012, I can no longer get the "Enter Attribute" box to open after inserting a block that contains attributes.

In AutoCAD 2011 I could run a lisp to insert one of my blocks that contain attributes, once the block was inserted the "Enter Attribute" Box would open up. However the same lisp when used in 2012 does not act the same, I either have to double click the block to edit it or I must enter everything in the command line.

I don’t know if there is a system variable I can set to fix this.
I have my ATTDIA and ATTREQ system variables set as follows
ATTDIA = 1 Uses a dialog box
ATTREQ = 1 Turns on prompts or a dialog box for attribute values, as specified by ATTDIA

Here is the lisp I have been using.
;Title Bar
;
(defun c:ACADtitlebar (/ pt1)
(setvar "cmdecho" 0)
(setvar "snapmode" 1)
(command "-layer" "Make" "S-TXT-TTL" "Color" "10" "" "Ltype" "Continuous" "" "LWeight" "0.70" "" "")
(setq pt1 (getpoint "Pick insertion point:"))
(command "-insert" "title" pt1 (getvar "dimscale") "" "")
(setvar "cmdecho" 1)
)

Also I have attached the block to help.

Thanks for any help

BlackBox
2011-05-16, 09:20 PM
I do not experience this behavior, when ATTDIA = 1.

matthew.159401
2011-05-16, 09:27 PM
With Attdia set to 1, when inserting the block with the lisp, the Edit Attribute box pops up for you without having to do anything else?? If so do you know of any other system variable I could look at to fix this?
Thanks for your help and time.

jaberwok
2011-05-17, 10:45 AM
I don't know why, but try changing the attributes' "verify" settings to "no".

matthew.159401
2011-05-17, 09:10 PM
Is there a system variables I can change this in or do I to change this on every block?
Thanks for your help and time.

jaberwok
2011-05-18, 08:34 PM
Did changing the attributes work then? :scratchhead:

You can change the "title" file which will help with future drawings.

matthew.159401
2011-05-24, 08:12 PM
Mabye I am doing this wrong, but I am unsure where to change the attribute "verify" settings to "no". I still can't get this problem fixed.
Thanks for your help and time.

BlackBox
2011-05-24, 09:12 PM
Mabye I am doing this wrong, but I am unsure where to change the attribute "verify" settings to "no". I still can't get this problem fixed.
Thanks for your help and time.

ATTDEF command shown.

matthew.159401
2011-05-31, 02:36 PM
This did not solve my problem.

Thanks for your help and time.

tthompson
2011-07-25, 05:08 PM
Matthew, did you ever solve this issue with 2012 attributes? we have run a across the same issue with our inserter routine.

matthew.159401
2011-07-29, 04:56 PM
No I have not solved the problem yet. Have you fixed your issue yet?

tedg
2011-07-29, 06:39 PM
No I have not solved the problem yet. Have you fixed your issue yet?
If you simply insert the block into a drawing do you get your attribute dialog box?
I'm in Acad 2011, tested your block and lisp, works great for me.
Maybe you have some other program setting those variables?

Maybe adding them into your code?


(defun c:ACADtitlebar (/ pt1)
(setvar "attreq" 1)
(setvar "attdia" 1)
(setvar "cmdecho" 0)
(setvar "snapmode" 1)
(command "-layer" "Make" "S-TXT-TTL" "Color" "10" "" "Ltype" "Continuous" "" "LWeight" "0.70" "" "")
(setq pt1 (getpoint "Pick insertion point:"))
(command "-insert" "title" pt1 (getvar "dimscale") "" "")
(setvar "cmdecho" 1)
)

BlackBox
2011-08-02, 12:53 PM
Hope the user doesn't hit ESC. LoL

You (guys) may want to consider adding some *error* handling.

Edit: Also be sure to restore any variables you change.

matthew.159401
2011-08-02, 02:57 PM
The Block works fine in AutoCAD 2011 and lower, it is just giving me issues in AutoCAD 2012.
I tried to update the variables (attreq and attdia) before, and I still am not getting the attribute box to pop up.
I don't know if there is another variable that I need to change.

jeff.158830
2011-08-02, 06:52 PM
I ran into the same problems with some routines I've been running since r14... I haven't figured out the exact cause yet, but came up with this workaround. In the lisp routines that insert a block with attributes, I added the following code:

Before the insert command:
(if (> (atof (getvar "acadver")) 18.19)
(setvar "attreq" 0)
)

Just after the insert command:
(if (> (atof (getvar "acadver")) 18.19)
(vl-cmdf "_eattedit" (entlast))
)

Then, at the end of the routine:
(if (> (atof (getvar "acadver")) 18.19)
(setvar "attreq" 1)
)

The ATTREQ sys. var. allows the block to be inserted with the default values, then after insertion, EATTEDIT is run to edit the attributes.
The reason for checking the acadver sys. var. is because we run multiple versions of acad in the office. 2012 is version 18.2 - this just checks for acad 2012 or higher since the additional code is not needed for older version.

MathewR09444224
2013-11-19, 04:06 PM
Hey Jeff, I would like to get in contact with you to dicuss some other cad issues and this solution because I am having the same issuse with Cad. We just recently upgraded to 2012.