+ Reply to Thread
Page 1 of 4 1 2 3 ... LastLast
Results 1 to 10 of 32
  1. #1
    Full Member NEXTMARCUS's Avatar
    Computer Details
    NEXTMARCUS's Computer Details
    Operating System:
    windows xp; windows 8
    Discipline
    Mechanical
    NEXTMARCUS's Discipline Details
    Occupation
    Design tracer
    Discipline
    Mechanical
    Using
    AutoCAD 2013
    Join Date
    Dec 2012
    Location
    Rio, Brasil
    Posts
    50

    Question Import points in a .csv file to AutoCad .dwg file

    Hi everyone,
    I'm loking for a code to import a serie of points in the xyz axis to a dwg file, i used the Lee Mac's program PtManagerV2-4 and it has solved my problem in part , each point in the .csv file has an information , this information should apear in autocad as a text close to the point it was linked in excel.

    can anyone help me?
    Thanks everyone!
    follows format below of the .csv file


    2.7149,4.5177,0, point 1
    5.6981,5.1197,0, point 2
    5.9822,7.6342,0, point 3
    6.8346,3.5969,0, point 4
    9.2496,4.2698,0, point 5
    9.5337,6.9613,0, point 6
    11.8777,6.4655,0,point 7


    Sorry about my very bad english
    Attached Images

  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,532

    Default

    Lee Mac's Point Manager might work. Click on link below.

    http://www.lee-mac.com/ptmanager.html
    "I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police

    Eat brains...gain more knowledge! I've gone over to the dark side.

  3. #3
    Full Member NEXTMARCUS's Avatar
    Computer Details
    NEXTMARCUS's Computer Details
    Operating System:
    windows xp; windows 8
    Discipline
    Mechanical
    NEXTMARCUS's Discipline Details
    Occupation
    Design tracer
    Discipline
    Mechanical
    Using
    AutoCAD 2013
    Join Date
    Dec 2012
    Location
    Rio, Brasil
    Posts
    50

    Default

    Thanks for de reply, but this program writes only the points in the .dwg file not the text close to the point.
    am i right? Or i'am doing something wrong?

  4. #4
    Forum Deity Tharwat's Avatar
    Discipline
    Mechanical
    Tharwat's Discipline Details
    Occupation
    MEP AutoCAD Draftsman
    Discipline
    Mechanical
    Details
    HVAC, Drainage, Water Supply, Fire Fighting and a little about Electrical.
    Using
    AutoCAD 2014
    Join Date
    Oct 2009
    Location
    Great Syria , Lives in Abu Dhabi
    Posts
    3,764

    Default

    Can you upload a sample drawing shows the point with its information besides the height of the text ?
    - When aim is being settled in my mind , I have to reach it and get it in hand whatever it costs and wherever it is and will never give up . Tharwat said

  5. #5
    Full Member NEXTMARCUS's Avatar
    Computer Details
    NEXTMARCUS's Computer Details
    Operating System:
    windows xp; windows 8
    Discipline
    Mechanical
    NEXTMARCUS's Discipline Details
    Occupation
    Design tracer
    Discipline
    Mechanical
    Using
    AutoCAD 2013
    Join Date
    Dec 2012
    Location
    Rio, Brasil
    Posts
    50

    Default

    Yes i'll upload an example, i think this information could apear as a tag within the point's attibute.
    the origin of the text can coincide with the point.
    Attached Files

  6. #6
    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,743

    Default

    If you create an attributed block for your point, you can use my existing Point Manager program to import the attributed block and populate the block attribute value with the data that follows the point coordinates.
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

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

  7. #7
    Full Member NEXTMARCUS's Avatar
    Computer Details
    NEXTMARCUS's Computer Details
    Operating System:
    windows xp; windows 8
    Discipline
    Mechanical
    NEXTMARCUS's Discipline Details
    Occupation
    Design tracer
    Discipline
    Mechanical
    Using
    AutoCAD 2013
    Join Date
    Dec 2012
    Location
    Rio, Brasil
    Posts
    50

    Default

    Tanks Lee ill try this solution.

  8. #8
    Full Member NEXTMARCUS's Avatar
    Computer Details
    NEXTMARCUS's Computer Details
    Operating System:
    windows xp; windows 8
    Discipline
    Mechanical
    NEXTMARCUS's Discipline Details
    Occupation
    Design tracer
    Discipline
    Mechanical
    Using
    AutoCAD 2013
    Join Date
    Dec 2012
    Location
    Rio, Brasil
    Posts
    50

    Default

    But in this case should i create an attribute block for each point that i've imported using the point manager?

    Thanks for the reply.

  9. #9
    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,532

    Default

    I believe all you need is one attributed block.
    "I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police

    Eat brains...gain more knowledge! I've gone over to the dark side.

  10. #10
    Forum Deity Tharwat's Avatar
    Discipline
    Mechanical
    Tharwat's Discipline Details
    Occupation
    MEP AutoCAD Draftsman
    Discipline
    Mechanical
    Details
    HVAC, Drainage, Water Supply, Fire Fighting and a little about Electrical.
    Using
    AutoCAD 2014
    Join Date
    Oct 2009
    Location
    Great Syria , Lives in Abu Dhabi
    Posts
    3,764

    Default

    Registered forum members do not see this ad.

    Try this routine and let me know how it goes ....

    Code:
    (defun c:Test (/ Deconstruct_String _att file st p pt)
      ;;; Tharwat 04. 01 2013 ;;;
      (defun Deconstruct_String (st delimiter / p l)
        (while (setq p (vl-string-search delimiter st 0))
          (setq l  (cons (substr st 1 p) l)
                st (substr st (+ p 2) (strlen st))
          )
        )
        (if st
          (setq l (cons st l))
        )
        (setq l (reverse l))
      )
      (defun _att (pt string)
        (entmakex (list '(0 . "ATTDEF")
                        (cons 10 pt)
                        '(40 . 0.2)
                        '(1 . "Pt")
                        (cons 2 string)
                        '(3 . "point")
                        '(70 . 0)
                  )
        )
      )
      (if (setq file (getfiled "Select Excel file ..." "" "csv" 16))
        (progn
          (setq file (open file "r"))
          (while (setq st (read-line file))
            (setq st (Deconstruct_String st ";"))
            (setq p (Deconstruct_String (car st) ","))
            (_att
              (setq
                pt (list (read (car p)) (read (cadr p)) (read (caddr p)))
              )
              (vl-list->string (vl-remove 32 (vl-string->list (last st))))
            )
            (entmakex (list '(0 . "POINT") (cons 10 pt)))
          )
          (close file)
        )
        (princ)
      )
      (princ)
    )
    - When aim is being settled in my mind , I have to reach it and get it in hand whatever it costs and wherever it is and will never give up . Tharwat said

Similar Threads

  1. Is it possible to import csv. file data into AutoCAD?
    By Treehugger in forum AutoCAD General
    Replies: 13
    Last Post: 23rd Jan 2013, 02:59 am
  2. Error at the import Points option... and error in the open file command, need help...
    By ManAtWork in forum AutoCAD Bugs, Error Messages & Quirks
    Replies: 1
    Last Post: 13th Oct 2010, 06:42 pm
  3. Export/import drawing file to/from csv(text) file
    By mtjipta in forum AutoCAD Drawing Management & Output
    Replies: 0
    Last Post: 9th Jan 2010, 04:14 am
  4. Best Way To Import An Excel File To AutoCAD?
    By AQucsaiJr in forum AutoCAD General
    Replies: 10
    Last Post: 8th Dec 2008, 10:08 pm
  5. AutoCad LT file import to GIS system
    By GOLFBLDR in forum AutoCAD Beginners' Area
    Replies: 9
    Last Post: 14th Jul 2008, 04:06 pm

Tags for this Thread

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