getting a text listing of block coordinates
getting a text listing of block coordinates
(OP)
This is a bit of a hard question really - does anyone know how to generate a list of coordinates of the conveyor blocks on a layout?
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS Come Join Us!Are you an
Engineering professional? Join Eng-Tips Forums!
*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting GuidelinesJobs |
getting a text listing of block coordinates
|
RE: getting a text listing of block coordinates
(defun WRITECOORDS ()
(setq TXTFILE
(open "C:\\CONVLIST.txt" "W")
CNT 0
)
(setq BLKNAME (getstring "\n Enter Block name? "))
(setq BLKSS (ssget "X" (list (cons 2 BLKNAME))))
(if BLKSS
(while (< CNT (sslength BLKSS))
(setq COORD (cdr (assoc 10 (entget (ssname BLKSS CNT))))
XPT (rtos (car COORD) 2 3)
YPT (rtos (cadr COORD) 2 3)
ZPT (rtos (caddr COORD) 2 3)
COORD (strcat XPT "," YPT "," ZPT)
)
(write-line COORD TXTFILE)
(setq CNT (1+ CNT))
)
)
(close TXTFILE)
)
RE: getting a text listing of block coordinates
If you are familiar with ATTEXT command,you will be able to extract the block insertion point coordinates by adding BL:x and BL:y into your extraction text. You should add a unique attribute i.e. CONVEYORNUMBER so other block coordinates will not be extracted.
You can format the resulting text file in EXCEL.
209larry
RE: getting a text listing of block coordinates
RE: getting a text listing of block coordinates
kristof79,
If you can send me a drawing of the block or the drawing
you want processed, I'll take a look at it and give you
a solution. Email to grevark@aol.com.