+ Reply to Thread
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 21
  1. #1
    Senior Member
    Using
    Civil 3D 2008
    Join Date
    Apr 2008
    Location
    Donji Miholjac, Croatia
    Posts
    101

    Question Polyline question...

    Registered forum members do not see this ad.

    Hy everyone!!! I have a problem, I draw polyline (2D) and need lisp that ''reads'' my pline and extract ''pick points'' with coordinates (X,Y in this case there is no Z coordinate), so these points must extract to new file txt/csv/xls, or just to put points on that polyline... Maybe this question is solved in the past on this forum...but didn't find it...anybody????

  2. #2
    Quantum Mechanic ReMark's Avatar
    Computer Details
    ReMark's Computer Details
    Operating System:
    Windows 7 Pro 64-bit
    Computer:
    Thinkmate
    Motherboard:
    Intel DX58SO2 LGA1366 X58
    CPU:
    Intel i7-960 Quad-core 3.20GHz 8MB cache
    RAM:
    12GB (3x4GB) PC3-106000 DDR3
    Graphics:
    nVidia Quadro 4000, 2GB GDDR5
    Primary Storage:
    150GB Velocipraptor 10,000 rpm
    Secondary Storage:
    none
    Monitor:
    Dell P24LLH - 24" wide screen LCD
    Discipline
    See details...
    ReMark's Discipline Details
    Occupation
    CAD Draftsman/Designer...chemical manufacturing.
    Discipline
    See details below.
    Details
    I work for a specialty chemical manufacturer. I do a little bit of everything from P&IDs to civil to architectural and structural.
    Using
    AutoCAD 2015
    Join Date
    Nov 2005
    Location
    Norwalk, CT USofA
    Posts
    39,998

    Default

    Is this LISP routine what you're looking for?

    http://cadtips.cadalyst.com/points/export-coordinates
    "I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police

    Eat brains...gain more knowledge!

    I'm now a full member of the Society for the Promotion of Mediocrity in CAD. Standards? We don't need no stinkin' standards! Take whatever advice I offer and do the opposite.

  3. #3
    Senior Member
    Computer Details
    VVA's Computer Details
    Operating System:
    Windows 7
    CPU:
    Intel Core i5-2400
    RAM:
    8 Gb
    Graphics:
    Nvidia Quadro 600
    Primary Storage:
    Seagate 500 GB + WD 750 GB
    Monitor:
    Philips 27"
    Using
    AutoCAD 2013
    Join Date
    Dec 2006
    Location
    Minsk, Belarus
    Posts
    427

    Default

    Or look this
    Export of coordinates of the specified points, the chosen objects: points, blocks, polylines, splines in a text file or Excel.
    Text file — txt, or csv.
    A rounding off of coordinates according to current adjustments of a command _UNITS (LUPREC system variable)
    3 commands Are certain
    COOR - export of coordinates
    COORN-export of coordinates with numbering. Numbers of points are drawn by the text on the current layer, the current style, current height (TEXTSIZE)
    COORT-export of coordinates with numbering where number considers the text nearest to a point

  4. #4
    Senior Member
    Using
    Civil 3D 2008
    Join Date
    Apr 2008
    Location
    Donji Miholjac, Croatia
    Posts
    101

    Default

    Quote Originally Posted by VVA View Post
    Or look this

    Thx for posting that, I already used that lisp, and it helped me...but is there a option when I draw pline, lisp puts dots on insertion places on that pline?? and after that I use COOR lisp and pick up all that coordinates (I need that because i need manually enter Z coord in that particular places)...THX for posting hyperlink..

  5. #5
    Full Member
    Using
    Civil 3D 2008
    Join Date
    May 2009
    Posts
    79

    Default

    Give it a shot. It save on ".csv" format, separated by ","


    Code:
    (defun c:plex()
      (setq el (entget (car (entsel "\n Select the pline to extract: "))))
      (setq file (open (getfiled "Output file" "" "csv" 9) "w"))
      (repeat (setq i (length el))
        (if (= (car (setq l1 (nth (setq i (1- i)) el))) 10)
          (write-line (strcat (rtos (cadr l1)) "," (rtos (caddr l1))) file)
          )
        )
      (close file)
    (princ)
    )


    Late.... =)

  6. #6
    Senior Member
    Using
    Civil 3D 2008
    Join Date
    Apr 2008
    Location
    Donji Miholjac, Croatia
    Posts
    101

    Default

    Quote Originally Posted by ReMark View Post
    Is this LISP routine what you're looking for?

    http://cadtips.cadalyst.com/points/export-coordinates

    Hey man, I tried it, and this lisp only export points (it has only one function), VVA posted what I was looking for, THX for your time

  7. #7
    Senior Member
    Computer Details
    VVA's Computer Details
    Operating System:
    Windows 7
    CPU:
    Intel Core i5-2400
    RAM:
    8 Gb
    Graphics:
    Nvidia Quadro 600
    Primary Storage:
    Seagate 500 GB + WD 750 GB
    Monitor:
    Philips 27"
    Using
    AutoCAD 2013
    Join Date
    Dec 2006
    Location
    Minsk, Belarus
    Posts
    427

    Default

    goldy2000
    If I have correctly understood, command COORNP is necessary to you

  8. #8
    Senior Member
    Using
    Civil 3D 2008
    Join Date
    Apr 2008
    Location
    Donji Miholjac, Croatia
    Posts
    101

    Default

    Quote Originally Posted by VVA View Post
    goldy2000
    If I have correctly understood, command COORNP is necessary to you
    Hmmm, sounds good VVA, but can explain little bit more??
    COORNP means coordinate numbering (COORN lisp helps here) and what is P meaning?? point?? or doting the exact place of polyline inflection?? hmmm...

  9. #9
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    16,835

    Default

    Are you looking to just extract the Vertex point of an LWPOLYLINE and write these to Excel?
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

  10. #10
    Senior Member
    Computer Details
    VVA's Computer Details
    Operating System:
    Windows 7
    CPU:
    Intel Core i5-2400
    RAM:
    8 Gb
    Graphics:
    Nvidia Quadro 600
    Primary Storage:
    Seagate 500 GB + WD 750 GB
    Monitor:
    Philips 27"
    Using
    AutoCAD 2013
    Join Date
    Dec 2006
    Location
    Minsk, Belarus
    Posts
    427

    Default

    Registered forum members do not see this ad.

    Quote Originally Posted by goldy2000 View Post
    Hmmm, sounds good VVA, but can explain little bit more??
    COORNP means coordinate numbering (COORN lisp helps here) and what is P meaning?? point?? or doting the exact place of polyline inflection?? hmmm...
    CoorNP-Coordinates + Numbers + Points

Similar Threads

  1. how to convert 2d polyline to polyline
    By azman in forum AutoCAD 2D Drafting, Object Properties & Interface
    Replies: 29
    Last Post: 23rd Dec 2013, 09:16 am
  2. Polyline Vertex Question
    By Lee Mac in forum AutoLISP, Visual LISP & DCL
    Replies: 28
    Last Post: 17th Feb 2010, 04:39 pm
  3. Hello! First post and a question - Array along a polyline?
    By bikerjoe in forum AutoCAD General
    Replies: 2
    Last Post: 10th Feb 2009, 09:49 am
  4. Join 2d polyline to 3d polyline
    By Tconn in forum AutoCAD Drawing Management & Output
    Replies: 4
    Last Post: 12th Jul 2007, 05:59 pm
  5. newb! question - join polyline then fillet
    By pdlefief in forum AutoLISP, Visual LISP & DCL
    Replies: 4
    Last Post: 10th Apr 2006, 09:32 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts