Jump to content

Search the Community

Showing results for tags 'excel format'.

  • 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. Hi. I am trying to extra layer data, including the lineweight onto an excel format. I added the lineweight information into the lisp routine, but I am definitely doing something wrong, as it continues to give me an error. Thank you in advance! Here is the routine that was modified to include the lineweight.. (defun c:LA2EXCEL (/ nm lnm llnm nam name opf ln lname color ltype lna lnamea colora ltypea,line_wt,description) ; ;I added line_wt in the line above ; (setq nm (getvar "dwgname")) (setq lnm (strlen nm)) (setq llnm (- lnm 3)) ;(setq lay_alst (entget (tblobjname "LAYER" "LAYER-NAME"))) ;(setq line_wt (cdr (assoc 370 lay_alst))) (setq lay_alst (entget (tblobjname "LAYER" "LAYER-NAME"))) ; ;I added this line below (setq line_wt (cdr (assoc 370 lay_alst))) ;I added this line above ; (setq nam (substr nm 1 llnm)) (setq name (strcat nam "csv")) (setq opf (open name "w")) (setq ln (tblnext "layer" T)) (setq lname (cdr (assoc 2 ln))) (setq color (cdr (assoc 62 ln))) (setq ltype (cdr (assoc 6 ln))) (setq stat (cdr (assoc 70 ln))) (cond ((= stat 1)(setq state "FROZEN")) ((= stat 2)(setq state "FROZEN IN NEW VPORT")) ((= stat 4)(setq state "LOCKED")) ((< color 0)(setq state "OFF")) ((>= color 0)(setq state "ON")) ) (write-line "Layer Name,Color,Linetype,Condition,Line_wt,Description" opf) (write-line (strcat lname "," (rtos (abs color) 2 0) "," ltype "," state) opf) (while (setq lna (tblnext "layer")) (setq lnamea (cdr (assoc 2 lna))) (setq colora (cdr (assoc 62 lna))) (setq ltypea (cdr (assoc 6 lna))) (setq stata (cdr (assoc 70 lna))) (cond ((= stata 1)(setq statea "FROZEN")) ((= stata 2)(setq statea "FROZEN IN NEW VPORT")) ((= stata 4)(setq statea "LOCKED")) ((< colora 0)(setq statea "OFF")) ((>= colora 0)(setq statea "ON")) ) (write-line (strcat lnamea "," (rtos (abs colora) 2 0) "," ltypea "," statea) opf) ) (close opf) (alert (strcat "File " name " created in current folder")) (princ) ) hanks!
×
×
  • Create New...