Double-click Edit Attribute
I've successfully customized the CUI to run my lisp routine when the user double-clicks on an attribute. I need to change the lisp routine to select the attribute they double-clicked on? Everything I try returns the block, not the specific attribute?
I expected something very simple like this to work ...
(setq ss1 (ssget "i:n")) or (setq ss1 (ssget "i:v"))
Thanks in advance for your help
Comments
-
nentsel will allow the selection of the 'nested' attribute
Try something like :(defun c:do-it () (if (setq selResult (nentsel)) (setq ent (car selResult)) ;else (exit) ) (setq selEname (entget ent)) ;; assume stuff :) ) (alert (strcat (cdr (assoc 2 selEname)) " : " (cdr (assoc 1 selEname)))) (princ) )
0 -
Using nentsel will not work if you want the code to work in a double click action.
(defun c:MyAttEdit ( / gr) (if (= 5 (car (setq gr (grread T)))) (print (entget (car (nentselp (cadr gr))))) ) (princ) )
Note:
Using(getvar 'lastpoint)
to acquire the point for nentselp does not work properly if there is a preselection.0 -
(setq ssText (ssget "i:v"))
(setq oText (car (nentselp (cadar (cdddar (ssnamex ssText))))))this seems to be doing the trick :-)
0 -
Does
"I:V"
even work?0 -
@Donald Broussard said:
(setq ssText (ssget "i:v"))
(setq oText (car (nentselp (cadar (cdddar (ssnamex ssText))))))this seems to be doing the trick :-)
Giving credit to the author would have been polite.
0 -
@Roy Klein Gebbinck said:
Does"I:V"
even work?Hi Roy,
It does for me if the attribute is pre-selected, which I assume Donald is relying on with the double clickChanging the DoubleClick functionality for attributes would mean that _eattedit would no longer be called
... but to each his own
0 -
I should have explained better:
I believe that using":V"
has not effect when combined with"I"
.0 -
Bricscad bug exposed ... It is not recognizing anonymous blocks correctly with double-click. Reported.
Is it just me or has the quality of support taken a huge hit?0 -
The support seems much better here to me in compared to Autodesk.
This is just an observation of a newcomer to the application.C. Hill
0 -
@chillme1 said:
The support seems much better here to me in compared to Autodesk.
This is just an observation of a newcomer to the application.C. Hill
Oh yes! Much better than Autodesk!
0