Jump to content

Search the Community

Showing results for tags 'extract coordinates'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • CADTutor
    • News, Announcements & FAQ
    • Feedback
  • AutoCAD
    • AutoCAD Beginners' Area
    • AutoCAD 2D Drafting, Object Properties & Interface
    • AutoCAD Drawing Management & Output
    • AutoCAD 3D Modelling & Rendering
    • AutoCAD Vertical Products
    • AutoCAD LT
    • CAD Management
    • AutoCAD Bugs, Error Messages & Quirks
    • AutoCAD General
    • AutoCAD Blogs
  • AutoCAD Customization
    • The CUI, Hatches, Linetypes, Scripts & Macros
    • AutoLISP, Visual LISP & DCL
    • .NET, ObjectARX & VBA
    • Application Beta Testing
    • Application Archive
  • Other Autodesk Products
    • Autodesk 3ds Max
    • Autodesk Revit
    • Autodesk Inventor
    • Autodesk Software General
  • Other CAD Products
    • BricsCAD
    • SketchUp
    • Rhino
    • SolidWorks
    • MicroStation
    • Design Software
    • Catch All
  • Resources
    • Tutorials & Tips'n'Tricks
    • AutoCAD Museum
    • Blocks, Images, Models & Materials
    • Useful Links
  • Community
    • Introduce Yourself
    • Showcase
    • Work In Progress
    • Jobs & Training
    • Chat
    • Competitions

Categories

  • Programs and Scripts
  • 2D AutoCAD Blocks
  • 3D AutoCAD Blocks
  • Images
    • Backgrounds

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 1 result

  1. Sample.dwg Hi all, I want to write a program which will export the coordinates of vertices for selected polylines with Object Data which corresponds to each polyline. Please refer to a sample drawing attached with this thread. I am happy with this program to export coordinates ; ---------------------------------------------------------------------- ; (Export LWPOLYLINE Vertices & Points to File) ; Copyright (C) 2000 DotSoft, All Rights Reserved ; Website: http://www.dotsoft.com ; ---------------------------------------------------------------------- ; DISCLAIMER: DotSoft Disclaims any and all liability for any damages ; arising out of the use or operation, or inability to use the software. ; FURTHERMORE, User agrees to hold DotSoft harmless from such claims. ; DotSoft makes no warranty, either expressed or implied, as to the ; fitness of this product for a particular purpose. All materials are ; to be considered ‘as-is’, and use of this software should be ; considered as AT YOUR OWN RISK. ; ---------------------------------------------------------------------- ;;Revised 8/23/07 CAB to report coordinates in current UCS (defun c:ptexport () (setq sset (ssget '((-4 . "<OR")(0 . "POINT") (0 . "LWPOLYLINE")(-4 . "OR>")))) (if sset (progn (setq itm 0 num (sslength sset)) (setq fn (getfiled "Point Export File" "" "txt" 1)) (if (/= fn nil) (progn (setq fh (open fn "w")) (while (< itm num) (setq hnd (ssname sset itm)) (setq ent (entget hnd)) (setq obj (cdr (assoc 0 ent))) (cond ((= obj "POINT") (setq pnt (cdr (assoc 10 ent))) (setq pnt (trans pnt 0 1));;**CAB (princ (strcat (rtos (car pnt) 2 "," (rtos (cadr pnt) 2 "," (rtos (caddr pnt) 2 ) fh) (princ "\n" fh) ) ((= obj "LWPOLYLINE") (if (= (cdr (assoc 38 ent)) nil) (setq elv 0.0) (setq elv (cdr (assoc 38 ent))) ) (foreach rec ent (if (= (car rec) 10) (progn (setq pnt (cdr rec)) (setq pnt (trans pnt 0 1));;**CAB (princ (strcat (rtos (car pnt) 2 "," (rtos (cadr pnt) 2 "," (rtos elv 2 ) fh) (princ "\n" fh) ) ) ) ) (t nil) ) (setq itm (1+ itm)) ) (close fh) ) ) ) ) (princ) ) (princ "\nPoint Export loaded, type PTEXPORT to run.") (princ) Now I want to add Object data such as: 1. For polylines on 'LVCable' layer - CSAMetric, Conductor, FeederNo, NoOfCores 2. For polylines on other layers - CSABlue, CSANeutral, CSARed, CSAYellow, FeederNo Thank you Best wishes, Jes G Sample.dwg
×
×
  • Create New...