Jump to content

Search the Community

Showing results for tags 'csv'.

  • 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 13 results

  1. Hello. Is it possible to write a lisp routine that could get all elements in model space, take whatever layers they are on, and extract all the layer properties into a spreadsheet? I have attached a sample cad file replicated to what I need to do. so basically, we get a raw cad file which some of the elements are being controlled by the colors. Now, I need to put the elements according to the following layer naming convention: Layer Cyan >> TL-1 Layer E >> TL-2 Layer Green >> TL-3 Layer RedStuff >> TL-4 Layer GROUND >> TL-5 Layer Yellow >> TL-6 But my problem is some other elements are on the same layer but different in color which is supposed to be put on a different layer such as: Color magenta >> TL-7 color blue >> TL-8 color whit >> TL-9 I only thought maybe I could just get all the elements properties and sort it out using excel sheet and manually do a simple script to change their layers and stuffs once I already know the specific colors to get that is present in my model space. quick select is a good option to do it but I got a bunch of drawings and bunch of elements in one drawing and it's so tedious to do it manually like that. I am open to any other easier suggestions if there's any and thank you in advance for any help. Drawing1.dwg
  2. Trussgod

    hsbCAD Production

    Hello, I'm wondering if anyone has any experience running output from hsbCAD and if you can advise on some issues we are having. I need to run a report that separates out just common stud lengths in excess of 1.8m and in quantities greater than 10. This needs to be issued as a list separately to the csv file produced for output to the saw, but with these items removed from the csv automatically. If anyone has any experience with this, please help a guy out! Thanks!
  3. Hello, I have been trying for the last few days to automate out a process but have found myself pretty stuck. The process now involves manually going in and looking at the properties of the polyline and copying over the length to a separate excel file and matching it to the block that it goes to. The blocks all have their locations recorded on a separate excel file. The best lead that I have right now is that I can use Data Extraction to pull all of the poly line data at once. However sadly the Data Extraction command cannot pull information of the vertexes of polylines. This is where i need help! I was thinking that I could get around this by assigning the location of the first vertex of the polyline's (the start point 's) X and Y coordinates to the hyperlink, which CAN be extracted with Data Extraction. With the X and Y coordinates I would be able to cross compare the X and Y coordinates with the one from the block and know which it is matched too. I am very new to using LISP and have attempted to write it myself with little success. I am not sure how to write in the Hyperlink just as a string rather than as an actual address. I would like to be able to select all of the polylines at once and have to command change all the hyperlinks at once. Thanks in advance for the help, I am exited to get better at using LISP! Leo
  4. Hi all, I have a lot of drawings for which I need to insert title blocks for. Each drawing is at a different scale so I have created a csv file, the first column being the file name and the second column being the scale. I wish to look for the current file name in the first column and then once I have that, return that file name's scale setting it as the variable 'scale'. I have a command script that will call the variable 'scale' when inserting the block. Any help would be much appreciated.
  5. Hi, i have a problem opening the csv automatically, i modified tharwat code but its not open the csv after saving the csv in other folder location.. (defun c:C2XLS (/ sel f o l) (princ "\n Select All texts :") (if (and (setq sel (ssget '((0 . "TEXT")))) (setq f (getfiled "Save as to csv format " (getvar 'DWGPREFIX) "CSV" 1)) (setq o (open f "w")) ; this line not open ) (progn ((lambda (x / sn e) (while (setq sn (ssname sel (setq x (1+ x)))) (setq l (cons (list (cdr (assoc 10 (setq e (entget sn)))) (cdr (assoc 1 e))) l)) ) ) -1) (setq l (vl-sort l '(lambda (q p) (< (cadr (car q)) (cadr (car p)))))) (write-line "CHAINAGE,EASTING,NORTHING" o) (mapcar '(lambda (v) (write-line (strcat (cadr v) "," (rtos (caar v) 2) "," (rtos (cadar v) 2) "," (rtos (caddar v) 2)) o)) l) (close o) ) ) (princ) )
  6. I have been having problems loading a lisp that has previously worked, without a problem for years, but now throws a message "Error: bad argument value: string position out of range 17". The lisp is loaded on opening of each drawing in the acaddoc.lsp, which has not changed. It is supposed to open a csv and update blocks. From what I can tell, it seems as though AutoCAD cant find the csv file in the Working Directory. (When opening a drawing with the lisp loaded in acaddoc.lsp specifying the name via findfile "name.csv") When I load the lisp through APPLOAD and manually select the file, via getfiled, it works. (findfile Nil) The Name of the csv has not changed in the acaddoc.lsp and the file is definitely in the same folder as the opened drawing. So my questions are, Is there any Variable in AutoCAD (Map 3d 2016) that could have changed to cause this? Is it a bug? Are there methods of finding the specified file in the same directory, (as the opened drawing), other than findfile? vla-get-FoundPath perhaps? How can I debug using VLISP? I tried (VL-BT) and get this; Backtrace: [0.19] (VL-BT) [1.15] (#) [2.12] (# "(vl-bt)" T #) :CALLBACK-ENTRY.6 (:CALLBACK-ENTRY) :ARQ-SUBR-CALLBACK.3 (nil 0) nil I'm not sure what it means? It's the first time I've used VLISP and only have a basic knowledge of VBA through a TAFE course, which was really more about VBS. At this stage I'm not sure if its a setting or AutoCAD is not looking in the right place? I have tried resetting autocad to default which didn't work, then I reinstalled autocad, which also didn't work. Then I updated to windows 10 just to see if some setting was changed or broken. None of those steps worked. I had been playing around with excel,( and had improved the spreadsheet which output the csv to also put out a xlsx, for a Data Link), in the previous weeks, which gave me the possibility that I had unwittingly changed a setting somewhere. The excel spreadsheet had worked with the lisp for at least 2 weeks before the error started to occur. One other thing to mention is that when excel is trying to save the csv and autocad is reading it,( has it open maybe? through the manual loading of it through the lisp), it comes up with an error 1004 or something. This happened to a co-worker who tried to debug it, and we tried alternate ways of saving the csv. After that moment the problems started. We tried the original untouched excel spreadsheet, acaddoc.lsp and method like we always had done, but now the error always occurs. Please, are there any suggestions?
  7. Hi, I am trying to export the location of an object to a csv/excel file. To explain further I have a 2D site layout with multiple instances of the same object (sensors) and I want to be able to export their locations to provide accurate data for our installation teams. I do understand that the location data is only as good as the drawing but the actual process has got me a little stumped... Any help would be very much appreciated! Thanks
  8. Hi all, A company I previously worked for had a tool that could export a .csv file out of a sheetset that contained all the attributes associated with that sheet set for different drawings etc which could then be edited in excel and then imported. As you imported it, it updated all the sheetset & drawings with the new values. The exporting part is the easy bit, does anyone know how to import it in a way that it can then overwrite the sheetset...? PS... I'm not a ACAD programmer by any stretch so existing tools would be handy or simple coding. cheers.
  9. Hi, I am very new to lisp and AutoCAD with no previous experience. I am working on a project which I’m finding pretty difficult. What I am trying to do is import attributes and properties associated with a sphere from a .csv file into the corresponding property set in AutoCAD. I found a solution online which will allow me to import the coordinates (x,y and z) and this works a treat. However, I am having difficulty trying to import attributes associated with the sphere into the extended data property sets. So say for example, I am trying to import the week number, a reference and a description in from the .csv file into AutoCAD, under properties and extended data. Would anyone have any guidance or direction they could give me? Anything at all would be greatly appreciated. Thank you in advance!
  10. Hello all, I work in a manufacturing facility and we are trying to come up with a way to extract data from an AutoCAD file in to a .KML or .CSV file which gives coordinate points, etc. This will be used in a mapping-type software to display/highlight areas of the plant with zooming capabilities and information shown on the left-side. We are trying to make it look something like Google Maps, so it can used to determine areas of the plant undergoing work, lighting zones, etc. We are in the preliminary stages of this project and I could use some help/advice on how you guys would approach this. I have intermediate AutoCAD knowledge, hence I am reaching out to the community. In a nutshell, I want to be able to extract coordinate data from our layout(s) which can used to pinpoint locations on the map and highlight regions, etc. Perhaps it could export data in to Excel with attributes assigned to the coordinates which give Area, Bay Location, etc. The initial thought was to somehow export this to a .KML file and use that as a starting point. Let me know what you guys think, and how to best approach this. Any help would be greatly appreciated! Thank you.
  11. Hello, I'm new to the world of LISP and have found lots of code that almost does what I am looking for. I have several drawings that contain text in the same location. ie each drawing has a title placed using the same instertion point. Additionally the text objects are layed out to look like a table. One column will have the heading and the other column will have the result. I would like to have a program the allows me to enter in the instertion points for each text element I want in the order I would like it to appear in the text document or ideally in a csv format. Thanks for your help!
  12. Hi all, I have just found out that i am going to be asked to add very basic attributed blocks to all of our drawing stock. All the data for each blcok currently sits in a CSV file, and I was wondering (or actually hoping:wink:) whether it is possible to create this without having to create each block individually. Would any bright sparks have any thoughts on if or how it could be possible ? Currently still using ACAD 2008 (frustrating but true!) Many thanks Vicki
  13. kari_sinkko

    Lat, Long csv

    Hi, I have a csv file that has let,long,meters and was wondering how to import it. I'm thinking there would be a script that would read it in the csv and show the lat long and meters. Been searching a bit now, it seems to be quite complicated. Using Autocad Architecture 2010.
×
×
  • Create New...