Selection of objects list of Properties as txt

Selection of objects list of Properties as txt

Automohan
Advocate Advocate
1,720 Views
4 Replies
Message 1 of 5

Selection of objects list of Properties as txt

Automohan
Advocate
Advocate

Need lisp for selection of objects list of Properties details export as text file.....

 

thanks

Automohan

"Save Energy"
Did you find this reply helpful? If so please use the Accept as Solution
0 Likes
Accepted solutions (1)
1,721 Views
4 Replies
Replies (4)
Message 2 of 5

ВeekeeCZ
Consultant
Consultant

Not sure what you mean. You mean LIST polylines and save it to file?

 

If so, you can type:

LOGFILEON

LIST 

<select objects>

LOGFILEOFF

See LOGFILEPATH to locate your *.log file.

 

Or other option can be to use THIS Lee's routine.

0 Likes
Message 3 of 5

Automohan
Advocate
Advocate

I have a dwg with 50 layouts each layout has 2 viewports (up & down), when I try to select top viewports by filter by X,Y position it is not selecting all 50 nos, means there in some viewports slily moved, I have to go through viewports to check

It's is with 0 Layer, below viewport also 0 layer

otherwise I have to run through each layout & change the above viewport & below viewports to different layers use filter command

Is there any other fast way to select all viewports extract as txt file

(Example: like command: Attout, Attin)

 

"Save Energy"
Did you find this reply helpful? If so please use the Accept as Solution
0 Likes
Message 4 of 5

ВeekeeCZ
Consultant
Consultant
Accepted solution

Try this simple one if that would be enough.

 

(defun c:VPexport (/ ss vd)

  (princ "\nLayout;VPCenterPoint-x;VPCenterPoint-y;Layer")
  (foreach l (layoutlist)
    (if (setq ss (ssget "_X" (list '(0 . "VIEWPORT") (cons 410 l))))
      (repeat (setq i (sslength ss))
        (setq vd (entget (ssname ss (setq i (1- i)))))
        (princ (strcat "\n" l ";" (rtos (cadr (assoc 10 vd)) 2 8) ";" (rtos (caddr (assoc 10 vd)) 2 8) ";" (cdr (assoc 8 vd)))))))
  (princ)
)

 

0 Likes
Message 5 of 5

ronjonp
Advisor
Advisor

Post your sample drawing. If i'm interpreting the problem correctly this should select the common viewports ( depending on the fuzz value needed for location ).

(defun c:foo (/ f p s ss)
  ;; RJP » 2018-12-13
  ;; Make this number larger if not all are selected
  (setq f 1e-2)
  (cond	((and (setq e (car (entsel "\nPick viewport to filter by location: ")))
	      (setq p (cdr (assoc 10 (entget e))))
	      (setq ss (ssget "_X" '((0 . "VIEWPORT") (-4 . "!=") (69 . 1))))
	 )
	 (setq s (mapcar 'cadr (ssnamex ss)))
	 (foreach x s (or (equal p (cdr (assoc 10 (entget x))) f) (ssdel x ss)))
	 (sssetfirst nil ss)
	 (print (strcat (itoa (sslength ss)) " viewports selected"))
	)
  )
  (princ)
)

Then you can change what you need in the properties palette.

0 Likes