×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

getting a text listing of block coordinates

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?

RE: getting a text listing of block coordinates

Here is something I whipped up...

(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

kristof79,

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

(OP)
209larry - sorry, I don't know much about AutoCAD, I'm trying to extract these for use with another program - how would I do that - could you provide slightly more detail

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources