Autolisp file in autocad prompts user for attribute value but not in BC
(defun c:insBlk ( sym_name / )
(setq *error* seterr)
(setvar "ATTREQ" 1)
(setvar "cmdecho" 0)
(setvar "texteval" 1)
(setvar "attdia" 0)
(princ "\n Specify insertion point: ")
(command "_.insert" sym_name pause "1" "1" "0" )
(setq *error* nil)
(PRINC)
)
This routine inserts a simple one attribute block into AutoCAD and prompts the user to enter an Attribute Value. But in BC it just inserts with a default attribute value. Id the Insertion syntax a little different in BC?
ta
This routine inserts a simple one attribute block into AutoCAD and prompts the user to enter an Attribute Value. But in BC it just inserts with a default attribute value. Id the Insertion syntax a little different in BC?
ta
0
Comments
-
try change attdia to 1:
(setvar "attdia" 1)
0 -
Would like it to be a command line prompt0
-
with:
(setvar "ATTREQ" 1) (setvar "attdia" 0)
it is working for me with command line prompt.
can't see any problem...
0 -
hmm(C:LVA_SYM3 "RTT")Specify insertion point:Rotation angle for block <0>:
after specifying the insertion point the block appears with the attribute filled by default and it takes me to enter a value for the rotation.
any thoughts on what is happening?0 -
this is the lisp I tested:
(defun c:test ( sym_name / ) (setq *error* seterr) (setvar "ATTREQ" 1) (setvar "cmdecho" 0) (setvar "texteval" 1) (setvar "attdia" 0) (princ "\n Specify insertion point: ") (command "_.insert" sym_name pause "1" "1" "0") (setq *error* nil) (PRINC) )
this is the command I used:(c:test "PVC ELBOW 90DEG 63SW_3d")
and it is working - taking my input for the attributes if I type them and not the default including the first attribute (in your case the only one).0