Search the Community
Showing results for tags 'export'.
-
Is There Any Way To Export All Layers Separately Into Pdf Format?
Shahtaj Bhutto posted a topic in Tutorials & Tips'n'Tricks
Hi Is there any way to export all layers separately into pdf format? i want to export all of them at once to edit them in illustrator. It's taking alot of time to export them one by one from autocad I don't have any professional Experience with programming but i have tried to made this .lisp with chatGPT but it's not working to export files which property in codes needs improvements please (defun c:ExportLayersToPDF (\Users\Useer\Desktop\pdf layers) (setq dwgname "EMERALD HILLS MP (2007) 25 01 2023") ; (setq dwgpath "F:\Shahtaj Ahmed Bhutto\AUTOCAD") ; (setq layname "") (while (setq layname (tblnext "LAYER" layname)) (and layname (/= layname "0") (/= layname "DEFPOINTS") (/= (logand (cdr (assoc 70 (tblsearch "LAYER" layname))) 1) 1) (progn (setq pdfname (strcat dwgname "_" layname ".PDF")) (setq pdffullpath (strcat dwgpath pdfname)) (command "-plot" "Yes" "Model" "" "" "DWG To PDF.pc3" "A0" "PORTRAIT" "Inches" "Fit" "Center" "No" "No" "No" "Yes" "No" "No" "Yes" "Yes" pdffullpath) T ) ) ) (princ) )- 10 replies
-
Help with Polyline Lisp (Export All Lengths to Table)
gordon_Gjs posted a topic in AutoLISP, Visual LISP & DCL
Hello, I am searching for a lisp that can export the lengths of all selected polylines and export them to either Excel or an AutoCad table. I have found and tested around 20 lisps but so far cannot find the right one. There were only 2 that look promising, maybe they could be modified? One was by Lee Mac and the other Jimmy Bergmark. I can post the 2 Lisp if needed. The lisp would need to have you select multiple polylines and give the total lengths of each polyline in the order that they were selected in. Then the data would either appear on an AutoCad table or Excel. Thanks for any help that can be provided. -
Guys, I need one help, someone knows one Lisp that I can get Texts (words) on AutoCad and export it in order of selection to a cell on Excel... Eg.: If I have 10 words, as I'll selecting it and when finished these then words will be exported to a cell (could be cels) to Excel. Thanks in advance...
-
Export 3D lines (and tin surface) to LandXML
B.N. posted a topic in AutoCAD 3D Modelling & Rendering
Hi, I'm modeling for excavations on GPS. The software on the excavators is Trimble Earthworks. I can use file flipper to convert a LandXML file (even a dxf) to a usable format for the machines. My problem: I can export to dxf and only get lines... tin surfaces can't be extracted from a dxf..... I can export to LandXML, but i don't know how to export the lines. The export only seems to use the tin surface.... Anyone has a method? Thanks!!! w0677 0610.dwg w0677 0610-2.dxf -
Export each layer to separate FBX file (AutoCAD 2017)
mzlink posted a topic in AutoLISP, Visual LISP & DCL
Hello. I have tried to edit a script found in another topic to suit my needs but i can't get it to work the way i want to. layer2dwg (defun c:lsave(/ actDoc layCol docName dwgName actSel fCount) (vl-load-com) (defun BrowseFolder (/ ShlObj Folder FldObj OutVal) (vl-load-com) (setq ShlObj (vla-getInterfaceObject (vlax-get-acad-object) "Shell.Application" ) Folder(vlax-invoke-method ShlObj 'BrowseForFolder 0 "Select Folder to create files" 0) ) (vlax-release-object ShlObj) (if Folder (progn (setq FldObj (vlax-get-property Folder 'Self) OutVal (vlax-get-property FldObj 'Path) ) (vlax-release-object Folder) (vlax-release-object FldObj) OutVal ) ) ) (setq actDoc(vla-get-ActiveDocument (vlax-get-acad-object)) actSel(vla-get-ActiveSelectionSet actDoc) layCol(vla-get-Layers actDoc) docName(vla-get-Name actDoc) fCount 0 ); end setq (if (setq wntPath (BrowseFolder)) (progn (vlax-for lay layCol (setq layName(vla-get-Name lay) dwgName (strcat wntPath "\\" (vl-filename-base docName) " - " layName ".dwg") ); end setq (vla-clear actSel)(vla-erase actSel) (vla-Select actSel acSelectionSetAll nil nil (vlax-safearray-fill (vlax-make-safearray vlax-vbInteger '(0 . 0)) '( ) ; end vla-safearray-fill (vlax-safearray-fill (vlax-make-safearray vlax-vbvariant '(0 . 0)) (list layName) ) ; end vla-safearray-fill ) ; end vla-select (if(/= 0(vla-get-Count actSel)) (vla-WBlock actDoc dwgName actSel)); end if (setq fCount(1+ fCount)) ); end vlax-for ); end progn ); end if (princ (strcat "\*** " (itoa fCount) " files were created *** ")) (princ) ); end of c:lsave I have poked the "WBlock" line in different ways but i can't get FBXEXPORT to work in the script. Any help is appreciated. -
publish layouts with specific name with a lisp
Manuel_Kunde posted a topic in AutoLISP, Visual LISP & DCL
Hello all. I need a lisp that will merge all layouts, that start with a certain name, into one PDF file. I have already made some progress with this Lisp. With the dwgprops I get information about the current file path, which I then merge all with the stract command. This also works, only the command "-Export" "ak" can only print one sheet. The number of layouts that start with "Plan..." are always different. Does anyone have an idea which command works instead for publish all Layouts, that beginns with the same name? The -publish command always asks me for a dsd file. (defun c:Documentsheets ( / pdfName ) (vl-load-com) ;--------- get variabel für contact - number: (setq acadObject (vlax-get-acad-object)) (setq acadDocument (vla-get-ActiveDocument acadObject)) (setq dProps (vlax-get-Property acadDocument 'SummaryInfo)) (vla-getCustomByIndex dProps 4 'myValue1 'myValue2) (setq contact myValue2) (princ) ;--------- get variable for order - number: (setq acadObject (vlax-get-acad-object)) (setq acadDocument (vla-get-ActiveDocument acadObject)) (setq dProps (vlax-get-Property acadDocument 'SummaryInfo)) (vla-getCustomByIndex dProps 5 'myValue1 'myValue2) (setq order myValue2) (princ) ;-------- (setq Pathone "\\\\company.lan\\xyz\\erp\\land\\contact\\") (setq Pathtwo "\\order\\") (setq Paththree "\\folder\\") ;-------- (command "_Qsafe") (foreach layname (vl-remove-if-not '(lambda (ln) (vl-some '(lambda (n) (wcmatch ln n) ) '("Plan*") ) ) (layoutlist) ) (setvar "ctab" layname) (setq pdfName (strcat Pathone Contact Pathtwo Order Paththree (strcat order "_Drawing") ) ) ) (if (findfile pdfName) (command "-EXPORT" "PDF" "Ak" "N" pdfName "J") (command "-EXPORT" "PDF" "Ak" "N" pdfName) ) )-
- autolisp
- visuallisp
-
(and 3 more)
Tagged with:
-
Export information 3DPolyLine To Chainage And Elevation
sanju2323 posted a topic in AutoLISP, Visual LISP & DCL
I Want Required lisp Export Data of 3DPolyLine To CSV "Chainage" And "Elevation" This lisp Proposed use for Cross Section. -
Hi. I know this is repetedly asked and discussed, despite this, I seem not to be able to convert. Can onyone with experience on export to STL for 3d printing, help with this one ? Tnx! Ascent_D78pt.dwg
-
Hi, I have been searching for a lisp to export txt to excel. Every lisp i've come across doesn't quite cut it. We use AutoCAD LT 2013 and AutoCAD 07. I want from every txt object (of a certain layer) the content + the X and Y coordinates. Hope that you guys cab help me out. Greetz, TekenaarNL
- 11 replies
-
- export
- lisp files
-
(and 1 more)
Tagged with:
-
DWG to GE w/line styles
Squirltech posted a topic in AutoCAD 2D Drafting, Object Properties & Interface
So, we have a SUE department and they use all sorts of line styles, example: -----CaTV D-----. The issue is that when exporting to a KML/KMZ file using GE Pro, the lines display in GE as solid lines. Going from Microstation to GE, the line styles display just as they do in the dgn. Anyone know any information about this or a way to resolve it? Currently, we're going from Acad to DGN to KML/KMZ to get the line styles to display. Thanks in advance!- 3 replies
-
- acad
- googleearth
-
(and 3 more)
Tagged with:
-
Exporting DWG files as readable text files
João Arthur posted a topic in AutoCAD Drawing Management & Output
Hi, I have recently come up with an idea for a project. And to execute that idea i need to be able to read trough a DWG and perform calculations based on the dimensions of walls, windows, doors and stuff like that. Is there anyway i can save a dwg of a floor plan in some kind of text format so i can write a program that is able to read trough it and identify those elements and perform calculations based on those dimensions? Thank You.- 3 replies
-
- export
- development
-
(and 4 more)
Tagged with:
-
Find nearest polyline, create new vertex and extract Object Data
jes_g posted a topic in AutoLISP, Visual LISP & DCL
Hi all, I'm trying write a LISP routine which will accomplish the following: 1. Select the block reference on the drawing 2. Find the closest polyline and closest point on that polyline from this block reference 3. Create vertex on that point and save the coordinates of this point into a variable for further use 4. Extract Object Data such as SerialNo (please refer to the screenshot attached) from that block reference 5. Loop for each block reference 6. Export the point's coordinates saved earlier and its corresponding SerialNo into txt or csv which will look like: X_coord, Y_coord, SerialNo E.g. 85.4535, 18.7903, 09I4E5Q2104022719 or 85.4535, 18.7903, 09I4E5Q2104022311, 09I4E5Q2104022719 (if it has more than one block reference) The output file is interpreted as the electric line having the load on that particular point. Here's what I have found/borrowed so far which can be of help: For creating vertex program provided by DEVITG at this thread ;; Design by Gabo CALOS DE VIT from CORDOBA ARGENTINA ;;; Copyleft 1995-2018 by Gabriel Calos De Vit ;; DEVITG@GMAIL.COM ; Hecho por Gabo CALOS DE VIT de CORDOBA ARGENTINA ;;; Copyleft 1995-2018 por Gabriel Calos De Vit ;; DEVITG@GMAIL.COM ; no error check. ;; no nothing (vl-load-com) (DEFUN C:EXAMPLE_ADDVERTEX ( / ACADOBJ BLK-REF-XYZ BLK-REFERENCE DOC LSTPOINT MODELSPACE NEWVERTEX PARAM-AT-CLOSEST-POINT PLINE PLINE-OBJ POINT-AT-PARAM VERTEX-POINT ) (SETQ ACADOBJ (VLAX-GET-ACAD-OBJECT)) (SETQ DOC (VLA-GET-ACTIVEDOCUMENT ACADOBJ)) (SETQ MODELSPACE (VLA-GET-MODELSPACE DOC)) (SETQ PLINE (ENTSEL "\nSelect Polyline: ")) (SETQ PLINE-OBJ (VLAX-ENAME->VLA-OBJECT (CAR PLINE))) (SETQ BLK-REFERENCE (CAR (ENTSEL "\Select the block-reference"))) (SETQ BLK-REF-XYZ (CDR (ASSOC 10 (ENTGET BLK-REFERENCE)))) ;;; (VL-CMDF "POINT" BLK-REF-XYZ "") (SETQ LSTPOINT (VLAX-CURVE-GETCLOSESTPOINTTO PLINE-OBJ BLK-REF-XYZ)) (SETQ PARAM-AT-CLOSEST-POINT (VLAX-CURVE-GETPARAMATPOINT PLINE-OBJ LSTPOINT)) (SETQ POINT-AT-PARAM (VLAX-CURVE-GETPOINTATPARAM PLINE-OBJ PARAM-AT-CLOSEST-POINT)) (SETQ VERTEX-POINT (LIST (CAR POINT-AT-PARAM) (CADR POINT-AT-PARAM))) ;;; (VL-CMDF "POINT" VERTEX-POINT "") (SETQ NEWVERTEX (VLAX-MAKE-SAFEARRAY VLAX-VBDOUBLE '(0 . 1))) (VLAX-SAFEARRAY-FILL NEWVERTEX VERTEX-POINT) (VLA-ADDVERTEX PLINE-OBJ (1+ (FIX PARAM-AT-CLOSEST-POINT)) NEWVERTEX) (VLA-UPDATE PLINE-OBJ) ) It works good but now it needs to be modified to work in a loop For extracting Object Data the answer provided by BlackBox at this thread might be helpful The Sample Drawing is attached I would appreciate your help Thank you Regards, Jes G Sample_Drawing.dwg- 7 replies
-
- nearest polyline
- extract od
-
(and 3 more)
Tagged with:
-
Hi all, I found this LISP routine by Tony Hotchkiss from here. If I understood this correct, it works with LWPolyline, Polyline and Point. For some reason it does not work will all polylines on my drawing. The sample drawing is provided below and attached with this thread https://drive.google.com/file/d/1bLurrxbnH6c9Fee5L4qIc0okwdVU0b9W/view?usp=sharing (defun vert (/ filterlist vla-obj-list lwlist 2dlist ptlist vlist1 vlist2 vlist3 ) (vl-load-com) (setq filterlist (make-filter) vla-obj-list (get-objects filterlist) lwlist (nth 0 vla-obj-list) 2dlist (nth 1 vla-obj-list) ptlist (nth 2 vla-obj-list) vlist1 nil vlist2 nil vlist3 nil ) ;_ end-of setq (if lwlist (setq vlist1 (make-list lwlist 2)) ) ;_ end of if (if 2dlist (setq vlist2 (make-list 2dlist 3)) ) ;_ end of if (if ptlist (setq vlist3 (make-list ptlist 3)) ) ;_ end of if (write-text vlist1 vlist2 vlist3) (princ) ) ;_ end of vert (defun make-list (p-list n / i vlist obj coords ca j x y z xy) (setq i (- 1) vlist nil ) ;_ end of setq (repeat (length p-list) (setq obj (nth (setq i (1+ i)) p-list) coords (vlax-get-property obj "coordinates") ca (vlax-variant-value coords) j (- 1) ) ;_ end-of setq (repeat (/ (length (vlax-safearray->list ca)) n) (setq x (vlax-safearray-get-element ca (setq j (1+ j)))) (setq y (vlax-safearray-get-element ca (setq j (1+ j)))) (if (= n 2) (setq xy (list x y)) (progn (setq z (vlax-safearray-get-element ca (setq j (1+ j)))) (setq xy (list x y z)) ) ;_ end of progn ) ;_ end of if (setq vlist (append vlist (list xy))) ) ;_ end-of repeat ) ;_ end-of repeat ) ;_ end-of make-list (defun make-filter (/ filter) (setq filter '((-4 . "<OR") (0 . "LWPOLYLINE") (0 . "POLYLINE") (0 . "POINT") (-4 . "OR>") ) ) ;_ end of setq ) ;_ end of make-filter (defun get-objects (filter / ss k lwp-list 2dp-list pt-list no-ent obj pl 2d pt ) (setq no-ent 1) (while no-ent (setq ss (ssget filter) k (- 1) lwp-list nil 2dp-list nil pt-list nil obj nil pl "AcDbPolyline" 2d "AcDb2dPolyline" pt "AcDbPoint" ) ;_ end-of setq (if ss (progn (setq no-ent nil) (repeat (sslength ss) (setq ent (ssname ss (setq k (1+ k))) obj (vlax-ename->vla-object ent) ) ;_ end-of setq (cond ((= (vlax-get-property obj "ObjectName") pl) (setq lwp-list (append lwp-list (list obj))) ) ((= (vlax-get-property obj "ObjectName") 2d) (setq 2dp-list (append 2dp-list (list obj))) ) ((= (vlax-get-property obj "ObjectName") pt) (setq pt-list (append pt-list (list obj))) ) ) ;_ end-of cond ) ;_ end-of repeat ) ;_ end-of progn (prompt "\nNo polylines or points selected, try again.") ) ;_ end-of if ) ;_ end-of while (list lwp-list 2dp-list pt-list) ) ;_ end-of get-objects (defun write-text (vl1 vl2 vl3) (setq fn (getfiled "Text File" "" "txt" 1)) (setq f (close (open fn "w"))) (setq msg "Points from LW-Polylines") (do-points fn vl1 msg 2) (setq msg "Points from 2d-Polylines") (do-points fn vl2 msg 3) (setq msg "Points from Point entities") (do-points fn vl3 msg 3) (princ) ) ;_ end of write-text (defun do-points (fn vl msg n) (setq f (open fn "a")) (write-line msg f) (write-line " x, y, z" f) (write-line "" f) (foreach point vl (setq x (nth 0 point) y (nth 1 point) ) ;_ end of setq (if (= n 2) (setq str (strcat (rtos x) "," (rtos y))) (progn (setq z (nth 2 point)) (setq str (strcat (rtos x) "," (rtos y) "," (rtos z))) ) ;_ end of progn ) ;_ end of if (write-line str f) ) ;_ end of foreach (setq f (close f)) (princ) ) ;_ end of defun (defun c:pts () (vert) (princ) ) ;_ end-of defun (prompt "PLIST.LSP by Tony Hotchkiss - enter PTS to start ") I am new in AutoLISP so I would appreciate if you could suggest me how this code can be modified to export all the coordinates of polylines for my sample drawing. Or maybe my drawing can be modified using another LISP routine. In addition, I want the program to output two files. The first file would be the XY coordinates of all points of the polylines with number (kind of identification). For example, The second file would include the points and distances between them. For example, Thank you Best wishes, Jes G Sample.dwg
- 4 replies
-
- export
- export coordinates
-
(and 2 more)
Tagged with:
-
Hey Guys, first time posting. This forum has helped me out in the past, and I've completely hit a wall. My problem is with multi-leaders. I convert a lot of .dwg files into .shp files and there isn't anyway export multi-leaders directly. So I've been trying to build some LISP code to place the text of the multi-leader at the exact location it points to (doesn't need to be pretty, it just needs the justify point of the text to be the right location). This is way beyond my level of expertise. Any help would be greatly appropriated (Or if a simpler solution is hidden somewhere, that would be great to!)
-
Hi, I have a 3D point (X,Y,Z) and label. This point and label have the same 2D base point (Xp,Yp = Xl, Yl). And there is not a block. Is it possible to export point number and coordinates to text file (with space as separator)? I attached image with an example. Thanks for any assistance.
-
Exporting Dynamic Blocks to single block drawings
richardb posted a topic in AutoCAD Drawing Management & Output
Hi There, This is my first post on this forum, here goes... I'm new to the concept of Dynamic Blocks, however i have a sizeable drawing estate that is built almost entirely of Dynamic blocks. The task is to replace each Dynamic block with a singular block reference, but before i get that far, i need to know what we're facing. How would i export dynamic blocks from a drawing into a directory? Each block contained within a dynamic block would need to be separated out? Is this even possible? Please help. Thanks Richard -
I'm fairly new to cad, been using it for less than a year but have never had this problem before: when i export a dwg file to pdf not all the lines appear... it is not a layer issue as some of the missing lines are in the same layer as those that are showing up. if you zoom in to the pdf they will appear but i have quality issues when plotting. i don't think it's the drawing because if i use autocad on the windows side of my mac it is fine although appears to be exporting faintly - blacks are more grey in colour. so i am assuming it's some sort of bug on autocad for mac? i had 2014, deleted it and upgraded to 2015 but have the same issue. i've upgraded to yosemite but the drawing was fine after this, it has only happened in the last few days. please help, my final crit is in 2 weeks!
- 26 replies
-
- lines missing
- faint
-
(and 2 more)
Tagged with:
-
Hello All. I need help with AutoCAD 2013 I have multiple drawings with 100's of tabs inside, I would like to either export or print out all of the tab names. If anyone knows a way to do this, I would love to hear about it. Thank you in advanced, Javier
-
Easy way to associate materials with layers?
Watson posted a topic in AutoCAD 3D Modelling & Rendering
Hola! Sorry if I'm posting this in the wrong place... I did search for this before posting, but didn't see anything relevant. First of all, I'm an AutoCAD guy. I only know enough about Inventor to be very dangerous. At the company I work for (manufacturing) the Design team (me) uses AutoCAD to create our space planning blocks. This is pre-sale activity. The Engineers model everything (post sales) in Inventor. Occasionally I will be asked to draw something that is "just like that other thing we did," so I will open up Engineering's model of that thing and export to DWG to use from there. For rendering and quoting we use a 3rd party software that manages information via layers. For example, a work surface face is on a specific layer, the edge is on a specific layer, the powdered components are on a specific layer, etc, etc... When I export from Inventor, the DWG file is VERY detailed, down to the screws, but everything is on the "0" layer. This really sucks because I have to spend a ton of time dissecting the block in order to assign the correct layer information to every bit of geometry. I noticed the other day though, that when I switched to a realistic or conceptual visual style, the freshly exported Inventor block retained all the sweet info... like it was showing details down to the grain direction of the surface. My question to you guys, is if you know of an easy way to get that info converted to layer? Whether that be in CAD after I export or from within Inventor in my export. Ideally there's already an LSP or something similar that can do this in a button press. -
I've tried macros, have done FLATTEN, and tried to set Z coordinates to zero multiple times, but still have a corrupt file that does not have all line art on Z=0. I need help flattening two plan files so that line art will show all coordinates at Z=). I will consider sharing via Dropbox if someone with a good showing & history on this site will help. Can also look into compensation via PayPal if desired. This is an ongoing problem for me and has been exacerbated by going between Revit, AutoCAD, and Sketchup, which sometimes exports 3D data. Email feature from cadtutor has been enabled, please contact via email. Sincerely,
-
Hello, all. I have a question concerning block counting. I have become familiar with the BCOUNT command, but I wanted to take it one step further for my particular application. What I have is several viewports within a drawing. Each viewport represents a particular floor of a building. Furthermore, within each floor are "loops" defined by colored, dashed lines in which there reside certain devices (blocks). Identical devices may exist within other loops on the same floor. Here's the question: Is there a way to count (and possibly export that data to a spreadsheet) the number of blocks that reside within each loop boundary? The boundaries are rarely simply rectangles. It's easy to count the number of blocks within a viewport, but I'm having trouble figuring out (if there even IS a way) how to count the number of blocks within my loop boundaries. **I should clarify and say that, when I say viewports, what I really mean is layouts. There is one viewport per layout/floor. Sorry if this caused any confusion or cringing. Thanks in advance. Beef
-
Hello All, I'm a beginner to both AutoCAD and Rhino and am just experimenting at the moment. However, I'm slightly more confident on AutoCAD than Rhino and was wondering if it's possible to complete a design in AutoCAD than transfer it to Rhino without losing any of the evidence of the "construction process" ? Thank you in advance for your help and advice. Kind Regards,
-
How do i batch convert 150+ dwg to pdf?
ben_vk posted a topic in AutoCAD Drawing Management & Output
Hi Guys, We have been supplied over 150 dwg files and I have been assigned the task of exporting them all to PDF. Is there a batch processor that is capable of doing this task? I can see software that will cost $99 and hopefully be able to do it, but im hoping to learn how to do it some other way (if possible!) Has anyone been down this path before and been able to do it? Thanks -
Hi, When using the Export function on the command line is there a way to type the destination in rather than having the save dialog pop up? Thanks.
-
HOw to Export GPS Coordinates to CSV
wajidgates posted a topic in AutoCAD 2D Drafting, Object Properties & Interface
Dear All, Good Day, I am looking for a method to export all the GPS coordinates which have been assigned to each point along with the properties of that point to an excel csv. In our drawings, there are multiple columns and each column has four points and each point has X,Y,Z coordinates. I want to export all this information to an excel sheet. Any idea? Thank You