Solved! Go to Solution.
Solved by cadffm. Go to Solution.
Solved by ya312. Go to Solution.
Solved by cadffm. Go to Solution.
"
As a WHAT? Can you explain in in other word or pictures?
Where and how do you want to use it "as rehum", whatever it is.
You can copy the fieldcode from the section below that line, but i am not sure if you ask for it.
Sebastian
@cadffm schrieb:
"Can you explain in in other word or pictures?
Where and how do you want to use it (it helps to understand what you really try to do and what you need)
Upload this sample file (dwg)
In your picture i can not see many informations and i can not see what you need.
Sebastian
(defun GetFieldCode (handle / tmp fld fldCounter subFldTxt fldNo fldList) (setq tmp (entget (handent handle))) ; get the entity (setq fld (entget (cdr (assoc '360 (entget (cdr (assoc '360 (entget (cdr (assoc '360 tmp))))) ; get the field object ) ) ) ) ) (setq fldtxt (cdr (assoc '2 fld))) ; get the field pattern string (setq fldCounter 0) (setq fldNo (cdr (assoc '90 fld))) ; number of fields (setq fldList (vl-remove-if 'null (mapcar '(lambda (a) (if (= (car a) 360) a)) fld))) ; filter list of field entities (while (< fldCounter fldNo) ; loop to the number of fields (setq tmp (strcat "\\_FldIdx " (itoa fldCounter))) ; part of the field string to be replaced (setq subFldTxt (cdr (assoc '2 (entget (cdr (nth fldCounter fldList))))) ) ; get the actual field string for each sub field (setq fldtxt (vl-string-subst subFldTxt tmp fldtxt)) ; and replace it in the text string (setq fldCounter (1+ fldCounter)) ) (setvar "USERS1" fldtxt) ; save the output field code to USERS1 system variable (princ) ) (defun C:TFC() ; Test GetFieldCode function (setq hnd (cdr (assoc '5 (entget (car (nentsel)))))) ; gettign the entity handle (GetFieldCode hnd) (princ fldtxt) (princ) )
Can't find what you're looking for? Ask the community or share your knowledge.