Search the Community
Showing results for tags 'csv file'.
-
I'm trying to get a custom association list with the format: ((("TAG1" . "VAL1A") ("TAG2" . "VAL2A")("TAG3" . "VAL3A") ...) (("TAG1" . "VAL1B")("TAG5" . "VAL5B) ("TAG7". "VAL7B") ...) (("TAG1" . "VAL1C)("TAG3" . "VAL3C")("TAG4" . "VAL4C") ...)) So far, I can generate this list. So, in essence, the keys of each sublist (tags) in the list can differ slightly, meaning some tags can be missing in the other sub list. Where this happens is when attributes of blocks differ by a bit, with some values missing from another. When we use "ATTOUT", AutoCAD bypasses this by inserting empty values when you read the file as a csv file. When I'm trying to create a CSV file, I'd like to have these tags be at the first row and fill up values per item in the list. What I want is basically an ATTOUT but with my own association list. I'm trying to use Write CSV by Lee-Mac for this. So far, the only way I can do this is brute force the first row with the tags, and then extract each Value such that (("TAG1" "TAG2" "TAG3" "TAG4" ...) ("VAL1A" "VAL2A" "VAL3A" "VAL4A" ...) ("VAL1B" "VAL2B" "VAL3B" "VAL4B" ...)) Any ideas about how I should go forward with these.
-
Hi, i'm want to import the code (or description) from csv file (X,Y,Code) on the coordinates of each point. I can do it in excel, but i'm looking for a easy way. The layer could be current, height 2, and rotation 0. I can change this properties later, so no problem about it. Please excuse my limited English, corrections are welcome. Many thanks in advance.
- 3 replies
-
- csv file
- coordinates
-
(and 2 more)
Tagged with:
-
Extract text Label and Dimension's to a CSV file
BrianTFC posted a topic in AutoLISP, Visual LISP & DCL
Hi all, I need some help with a lisp routine that I'm attempting to write. What I need to do is extract a panel label by selecting the text and then select the dimensions that I need extract, I've managed to extract the dimensions correctly but when the information is extracted I get is "nil" in the first cell where the panel label should be and the dimensions in the next to cells. I don't Have Excel on my workstation so I have to use CSV file, I've already wrote an extraction code to run in Excel to retrieve the information in the CVS file. Also is there a way to save the CVS file in the same location that I have the drawing open? If someone could help me I would appreciate it. (defun c:test( / s tx fn i d dl m file) (setq ss (ssget '((0 . "*text,*DIMENSION"))) fn "f:\\BrianD\\Dims.csv") (repeat (setq i (sslength ss)) (setq d (ssname ss (setq i (1- i))) dl (entget d) m (cdr (assoc 42 dl))) (setq tx (cons m tx))) (if tx (progn (setq file (open fn "a")) (write-line "" file) (foreach ss tx (princ ss file) (princ "," file) ) (if file (close file)) ) ) ) (princ) Thanks Brian- 21 replies
-
- extract
- dimensions
-
(and 2 more)
Tagged with:
-
AutoLisp for compiling of block attributes from csv file
nicodam84 posted a topic in AutoLISP, Visual LISP & DCL
Hi i'm looking for an Autolisp that help me to compile title block starting from a csv file. At the moment I know this Lisp http://www.lee-mac.com/updatetitleblock.html It is exactly what I need. The problem is that this program compile all the block title (present in "model" sheet) with the first line of the csv file. So all the block title will be equal. I need a routine that -for example- compile 5 block with attribute taking information from 5 different line of the csv file. This has to be done in "model" area. Does exist some progrma that colud be ok for this ?? Tnx in advance Nicola- 23 replies