Jump to content

Search the Community

Showing results for tags 'batch'.

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

  1. Having written the first draft of my old 'Global Attribute Editor' program almost three years ago, I thought it was about time I offered something new and improved. And so, I've spent some time putting together a new and improved... Batch Attribute Editor A full description of the program, including some 'Hints and Tips' for using it can be found here; but as a brief summary: the program allows the user to modify the values of multiple attributes residing within multiple attributed blocks across multiple drawings. Upon starting the program using the command syntax 'batte' (Batch Attribute Editor) at the command-line, the user is presented with the first of two dialog interfaces: the first screen for input of attribute data; the second for drawing selection. At the top of the first dialog there are three edit boxes in which the user can input a Block Name, Attribute Tag and a new value for such attribute. The program can also process multiline attributes and the attribute value can use Field Expressions. The program also offers the ability to increment an attribute value for each layout/drawing processed. If an attribute value contains markers surrounding numerical data, the numerical section between these markers will be incremented by one for each drawing processed by the program. The user can also reference existing attribute values, facilitating batch prefixing & suffixing of attributes. After attribute data has been entered and a number of drawings have been selected to be processed, the user may click the 'Run' button to modify the listed attributes in each of the select drawings. Some Previews... Attribute Data Interface Editing an Entry Selecting Drawings to be Processed BatchAttributeEditorV1-5.lsp
  2. 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) )
  3. I have a directory populated with several hundreds of drawings and scripts. For every drawing "A.dwg" there is a script "A.scr": A.dwg A.scr B.dwg B.scr C.dwg C.scr D.dwg D.scr ... Every script is unique. What I am looking to do is figure out a way to run every script on its associated drawing. Tools like ScriptPro.exe and the Civil 3D out-of-the-box Batch Save Utility work by running 1 script on many drawings in a folder, but in my case there is one unique script to be ran on one unique drawing. Any ideas would be appreciated.
  4. I am trying to find a way of automating the renaming and publishing (PDF) 2 copies of same drawing with different names - 1 set that would go to a client that request a certain job no (which we have on the title block - as attribute=client_job_no) and the same set but titled with our own job number (also shown on title block as a attribute=our_job_no) for our own files I'm wondering where to start - we have a lisp routine that renames individual drawings tabs to one of the above attribute values but we have to run it on each drawing manually - then we publish those. and then do the same again with the other lisp on all the drawing individually and publish those. but would be looking to link something together that can automate more of the process - i suppose something along the lines run the Client_rename lisp on all open drawings - publish all to pdf in folder xzy:xzy/Client pdf and in same routine then run the OUR_rename lisp on all open drawings - publish all to pdf in folder xzy:xzy/our pdf. very rusty on lispsso any help /direction would be appreciated.
  5. Hi, I'm looking to make a script, lisp or batch sort I could take all the 3D drawing from a file and convert it to a 2d drawing. I've tried a lot of thing like "flatshot", "outbounding", "flatten"... The best result was definitely with the "Flatshot" command, but it cannot be use as a script or lisp (I might be wrong). Outbounding wasn't effective at all. So I came ou with the Flatten Function from the Express tools that i run in the Wscript of Lee Mac. I made all a routine that goes like this : _open *file* _-view _top -calque nouv 2D _ai_selall _Flatten no _change tout propriétés elév 0 tout propriétés Couleur jaune _change tout propriétés ca 2D _ai_selall _-overkill terminé PURGER TOUT * NON _AUDIT OUI _-VIEW _TOP _qsave _close The fact is that the weight of the files are always too big and the details are not as accurate as "Flatshot". I could also add wblock to the script but it still a pretty heavy file So finally, I would need to take my 3D file to become a flat 2D drawing on a specific layer and color (pretty simple to do). Here's an example of the furniture i would need to "transform" 3-MLE3060EFM.dwg, the flatshot finish Flatshot.dwg and the flatten script 3-MLE3060EFM.dwg. Sorry for my bad english and just notice that the command are in french or internationnal.
  6. I need a script that will convert multiple DWG files to ONE single PDF file,I found one that does convert the dgw file but to single pdfs , im also having some issues with DWG files that are "read only" wont convert them but all my files i need to convert to pdf are READ ONLY.
  7. Hi folks. Have been trying to make s lisp code for a simple task but turned out that it might not be so easy. I found lots of information but not this one. So i'm asking if this is even possible to do. I have a block and it has many entities. The block has a name but all the (2-3) entities have different color. I'm trying to change the entity color without exploding the block and change the entity name. This part is ok and i even found a good solution for this. However the problem is that i have to rename also the main block regarding the selected color for the entity. I have 5-10 options for color. (112=blue, 113=red etc.) So the final block name should turn out as 123456-112. I know how to find the block name and change but when i go deep into entities then i dont have the DXF code for the original block name. So here i am in an endless loop. Can someone assist or show me some directions how to manage with this? Thanks.
  8. lamensterms

    Batch Convert .IPT to .DWG?

    Hey guys, I am in the process of updating our CAD Block Library and I have a collection of .IPT files which I would like to convert to .DWG. I am aware of the IMPORT command, and I am also aware that I can open the .IPT files in Inventor Fusion and save them to DWG from there... but I am going to be performing this conversion a few hundred times and I am just wondering if anyone knows of a good way to batch-convert. Thanks a lot for any help, looking forward to hearing back.
  9. 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
  10. I am working with Autocad 2014 and am trying to batch PDF using the BATCHPLOT utility built in to autocad. The problem I have is for some odd reason it is trimming off the right margin. It does not let me define how I want to window or anything to be plotted and I need to plot over 600 dwg to pdf. I used a page setup one time but had to hit ENTER all morning! Please help and chime in! God bless!
  11. Unfortunately, I'm not much of a programmer so I need some help with a routine. I typically cobble things together from what others have done but I can't really find anything to even start from on this one. The company I work for has panels created in ACAD 2013 which are exported to dxf and cut on a cnc machine. We manually nest these panels on sheets then export each sheet one at a time. What I'd like to be able to do is window select everything and have AutoLISP create a dxf for each sheet using an existing block reference as the name of the dxf. I've attached a dwg of what we typically have and labeled in yellow what's what. The entities that we export are only on the following layers: MAGENTA, WHITE, GREEN, & BLUE. Each of these represent a different cut type for our router. Anyway, anything someone could help with would be appreciated. I guess my biggest problems are how to select and cycle through each sheet. I guess another thing would be how to check if a sheet was empty so it wouldn't export those. I think if someone can get me a basic example I might be able to take it from there. I would like to learn more but don't seem to have the time. Again, anything would help and thanks for all the effort people put in on this forum. Lots of generous people giving their time here. Thanks. nesting.dwg
  12. Hi there, I want to plot 100+ drawings to PDF's and was wondering if there is a way to change the base file location it saves, to a location I can choose? I am currently using the PDF to DWG.pc3 file in a plotting script. Is there also a way to get rid of the PDF viewer when the script is running? Thanks
  13. Hi everyone, I have this script that will not work when a try to batch run it through Autoscript, however if I paste it dirctly into the command line it works no problem. Obviously I dont want to open each drawing up and paste as I have more than 2500 dwg. Any help please? Thanks in advance, Tom SELECT (ssget "x" '((2 . "AMAZON-LOCKER-08,AMAZON-LOCKER-10,AMAZON-LOCKER-11,AMAZON-LOCKER-13,AMAZON-LOCKER-14,BALER-1800HD,BALER-360,CC-CAT105,CC-HPZ2100-24,CC-HPZ2100-44,CC-HSB,CC-HSC,CC-KM4850,CC-LFB,CC-LFC,CC-SSB,CC-SSC,CC-SSF,CC-WF-LAMINATOR,CC-X4595-HCF-SF,CC-X4595-STD,CC-X4595-STD-F,CC-X4595-STD-HCF,CC-X5655,CC-X6204,CC-X7435,CC-X7655,CC-XDC252,CC-XDoc12-XDoc252,CC-XDOC252,CC-XDOC252-SM,CC-XER4595,CC-XWCP-90,CHAIR-FURN-SELECTOR-STATION,ENDLESS-AILSE-STATION-1,ENDLESS-AILSE-STATION-2,HOT-BUY,OMNI-BEACON-KIOSK,OMNI-CHAIR-KIOSK,OMNI-HUB-TABLE,OMNI-INK-FINDER-KIOSK,OMNI-SATELLITE-KIOSK,P@SS,ROLL-HOLDER-RACK-SPINNER,2PLUG,3PLUG,4PLUG"))) _.chprop layer laydel qsave
  14. I am attempting to make a modified version of the ATTIN command in order to automate the process; removing user prompts, specifying file import location, and batch processing from a specified directory. But I have run into a wall, and I am very new to LISP (about 3 weeks new now). This is a process I developed for my company to update title-block attribute tags more uniformly, reducing user input error when doing what is sometimes hundreds of drawings. Now that I am finally teaching myself Autolisp I'm trying to take it a step further. Thus far I have eliminated or worked around (defined variables) for all of the user prompts (file location, yes_no box, etc.). I have used found code to write a script to run this lisp on all drawings in a defined directory, as well as modified the single user selection to a global search with an added parameter of "(8 . "TB_LAYER") so that it only looks at blocks with attributes on this layer. This is to avoid the "acet-alert" box when blocks that do not have matching tag names are found, which stops the batch routine, and causing an alert box loop that freezes AutoCAD. The issues I am having trouble pinpointing are that when I run this routine on a single drawing with the correct parameters, it works like a charm. It successfully updates the block with the new information without any input required from the user. However, when the script runs it I get a "No handle found" return that doesn't end the script, but doesn't successfully rewrite the attributes. I'm at a loss because the script simply opens the drawing, runs the command individually, saves, and closes the drawings. So I can't understand why it doesn't work the same way as if i ran it on a per drawing basis. Any help would be appreciated, as i said before i am very new to lisp coding, so it may be plain as day to some of you. Please be gentle attimport.lsp
  15. I have come across the Multi-Batch program, but I don't find it to be terribly user-friendly. I have also used Hurricane a bit in the past too. I am thinking this might be the best option. I haven't checked out ScriptPro, but will do that next. I know it is probably wishful thinking but are there any programs that offer "the big red button that records your actions and then creates a script" rather than having to write a macro/script/lsp to input? If not, what is the most user-friendly program that I could throw my script in and have it run across mulitple drawings without having to open every drawing? For example, I have a script that will flip a drawing to paperspace, zoom extents, and set the Ltscale and PSLTscale, but right now I have to open every drawing and run it. Is there a program to run it on multiple drawings at once? Any recommendations would be appreciated.
  16. Hi! I'm trying to find a way to plot multiple (over a thousand) DWG files to PDF without doing each one manually. I've played around a little bit but without any luck. I'm using AutoCAD 2002 LT. Is there any way to do this? I've also got little to no experience with the more complex settings and abilities of autocad so when explaining please do so in laymans terms. Thanks very much to anyone that can help in advance! PS. 2002 lt has no general publish (only publish to web) option and I have no idea how sheet sets work.
  17. I'm a GIS analyst working with lots of CAD data and I'm looking to make a batch script to iterate thru .dwg's in a folder, apply a predefined export template (think thats an epf file, i can make this), and save the selected features to esri shapefile using the name of the source .dwg as the name of the output shapefile (.shp). I have about 500 files to process, ideally in groups of about 30-50 at a time. I have looked at the "Batch Exporting" Tutorial in AutoCAD Map3D Help, but this only shows how to script and batch mapexport to SDF. I'm looking to tweak the example provided in the tutorial to my requirements but I don't know any of the code words for the other functions/options in the Map 3D Export tool. Any help, pointers, or direction would be appreciated. Thank you.
  18. I needed to print 200+ drawings located in multiple locations, but only a section of each drawing that was not previously defined by a view or common coordinates... A batch printing process that could pause at each drawing to accept user input was what i was after. I stumbled upon a bundle of code that works! As a novice coder, I am hoping someone out there will tell me there is a much easier way! In order for this to work, I had to break in to a script file for user input. Since this cant be done, I created 2 seperate scripts within 2 LISPS that would loop infinitely.. I had to creat a txt file containing every drawing to be opened. This was done in excell fairly easily. The purpose of this list is to "read-line" and write to a script file. The script file would then contain one line. "OPEN" "file" "custom command" hopefully it makes sense as I post the code. The master list had to be modified everytime so that the first line is always "next" so I used VBA to delete the first line. This was all done with SDI=1 so i didnt have to worry about coding in a close.. Ok, here goes nothin... SET SDI=1 Main start program. The first drawing must be open at this time, and the master list will contain drawings 2 on. ;BATCH PRINT USER DEFINED VIEW ;JPLANERA 7/3/12 ;This routine will allow the user to define the view and will print the stored view ;Then the script callout starts the process that alters the "open" file script. ;Open the first drawing in the master list and initiate the DVP command to start. ;The master list will contain ALL but the current open drawing. (DEFUN C:DVP () (command "-view" "W" "1" pause pause) (while (= 1 (getvar "cmdactive") ) (command pause) ) (command "-plot" "y" "model" "RICOH C5000 ENG" "Letter (8.5\" X 11\")" "i" "P" "n" "V" "1" "f" "c" "y" "monochrome.ctb" "y" "a" "n" "y" "y") (command "script" "U:\\batchpress\\mos.scr") ) Contents of mos.scr -VIEW RESTORE 1 QSAVE MOS MOS.LSP this is the routine that reads from the master list, writes to a script file and erases the first line of the master list... ;OPEN DRAWING SCRIPT MODIFY ;JPLANERA 7/3/12 ;This routine will read the first line of the "master" list of drawings, then write it to a script file. ;This script file will contain only 1 line of code so autocad does not get "confused" ;A VBA routine is then used to delete the first line of the master list so that when ;this routine is run again, the first line to be read is the "next" drawing in the list. (defun c:MOS (/ MPTL L1 OF) (setq MPTL (open "U:\\batchpress\\masterpresstoollist.txt" "r") ) (setq L1 (read-line MPTL) ) (close MPTL) (setq OF (open "U:\\batchpress\\openfile.scr" "w") ) (write-line L1 OF) (close OF) (startapp "wscript" "\"U:\\batchpress\\deleteline.vbs\"") (princ) (command "script" "U:\\batchpress\\openfile.scr") ) contents of master list txt file (shortened of course). Done in excell. "DVP" at the end starts the loop back to the first LISP routine. OPEN M:\ENGR\Drawings\TOOLING\T18516\T18516.dwg DVP OPEN M:\ENGR\Drawings\TOOLING\T18519\T18519.dwg DVP OPEN M:\ENGR\Drawings\TOOLING\T18530\T18530.dwg DVP contents of script file to open drawings and call back first command LISP. I tried to do this all in the master list but kept getting runtime errors. I suspect because the list was being used while I was trying to edit it... solution was two files. OPEN M:\ENGR\Drawings\TOOLING\T18515\T18515.dwg DVP DeleteLine Function by TomRiddle 2008 DeleteLine "U:\BATCHPRESS\masterpresstoollist.txt", "", 1, 0 Function DeleteLine(strFile, strKey, LineNumber, CheckCase) 'DeleteLine Function by TomRiddle 2008 'Remove line(s) containing text (strKey) from text file (strFile) 'or 'Remove line number from text file (strFile) 'or 'Remove line number if containing text (strKey) from text file (strFile) 'Use strFile = "c:\file.txt" (Full path to text file) 'Use strKey = "John Doe" (Lines containing this text string to be deleted) 'Use strKey = "" (To not use keyword search) 'Use LineNumber = "1" (Enter specific line number to delete) 'Use LineNumber = "0" (To ignore line numbers) 'Use CheckCase = "1" (For case sensitive search ) 'Use CheckCase = "0" (To ignore upper/lower case characters) Const ForReading=1:Const ForWriting=2 Dim objFSO,objFile,Count,strLine,strLineCase,strNewFile Set objFSO=CreateObject("Scripting.FileSystemObject") Set objFile=objFSO.OpenTextFile(strFile,ForReading) Do Until objFile.AtEndOfStream strLine=objFile.Readline If CheckCase=0 then strLineCase=ucase(strLine):strKey=ucase(strKey) If LineNumber=objFile.Line-1 or LineNumber=0 then If instr(strLine,strKey) or instr(strLineCase,strkey) or strKey="" then strNewFile=strNewFile Else strNewFile=strNewFile&strLine&vbcrlf End If Else strNewFile=strNewFile&strLine&vbcrlf End If Loop objFile.Close Set objFSO=CreateObject("Scripting.FileSystemObject") Set objFile=objFSO.OpenTextFile(strFile,ForWriting) objFile.Write strNewFile objFile.Close End Function Ok hopefully this all makes sense. If further explaing is needed please let me know. Also i would be happy to hear there is an easier way!! Im sure this could be used to do multiple user input commands but i think i am going to take a break before I try to do any more!
  19. We would like to print a batch of files (up to 150-200) and be able to print over all DWG some information (Work Order number) that will be filled, or supplied by a text file (or somthing) else! I've check for a couples of hours now and did not find anything solid!! Any ideas anyone? I am not a CAD user, I am IT Staff!! Thank you!!
  20. We are working with the MEP-2010 software after being upgraded from ABS-2006 and we are finding that many of the drawings need a very simple, yet time-consuming fix. We simly need to open each DWG file, select a different plotter from the list, then re-select the original plotter. Apparently this is some form of glitch. None the less, we have many DWG files to perform this function on, so that we can continue to plot these files in the future. My goal is to find something that will allow us to modify the plotter for a group of DWG's at a single time. Does anyone know of something that will allow us to do this? PLEASE HELP! Thanks,
  21. I created an action macro to do the following: 1) Select all objects 2) Change the colour to "140" I saved it as "ActMacro001" I needed to apply this macro to heaps of files, and used the following batch process lisp (It applies ActMacro001 to files A.DWG, B.DWG, C.DWG etc): [color=#ff0000]([/color][color=#0000ff]defun[/color] C:BATCH[color=#ff0000]([/color][color=#0000ff]/[/color] dwgs scr-name lsp-name[color=#ff0000])[/color] [color=#ff0000]([/color][color=#0000ff]setq[/color] dwgs '[color=#ff0000]([/color][color=#ff00ff]"C:/A.DWG" "C:/B.DWG" "C:/C.DWG" "C:/D.DWG"[/color][color=#ff0000])[/color] scr-name [color=#ff00ff]"c:/tmp.scr"[/color] lsp-name [color=#ff00ff]"c:/batch.lsp"[/color] [color=#ff0000])[/color] (create-script scr-name dwgs lsp-name [color=#ff00ff]"(ChangeColour)"[/color] [color=#0000ff]T[/color][color=#ff0000])[/color] [color=#ff0000]([/color][color=#0000ff]command[/color] [color=#ff00ff]"_.SCRIPT"[/color] scr-name[color=#ff0000])[/color] [color=#ff0000]([/color][color=#0000ff]vl-file-delete[/color] scr-name[color=#ff0000])[/color] [color=#ff0000]([/color][color=#0000ff]princ[/color][color=#ff0000])[/color] [color=#ff0000])[/color] [color=#ff0000]([/color][color=#0000ff]defun[/color] ChangeColour[color=#ff0000]([/color][color=#ff0000])[/color] [color=#ff0000]([/color][color=#0000ff]command[/color] [color=#ff00ff]"ActMacro001"[/color][color=#ff0000])[/color] [color=#ff0000])[/color] [color=#ff0000]([/color][color=#0000ff]defun[/color] create-script[color=#ff0000]([/color]scr dwgs lsp cmd save [color=#0000ff]/[/color] f dwg[color=#ff0000])[/color] [color=#ff0000]([/color][color=#0000ff]setq[/color] f [color=#ff0000]([/color][color=#0000ff]open[/color] scr [color=#ff00ff]"w"[/color][color=#ff0000])[/color][color=#ff0000])[/color] [color=#ff0000]([/color][color=#0000ff]foreach[/color] dwg dwgs [color=#ff0000]([/color][color=#0000ff]progn[/color] [color=#ff0000]([/color][color=#0000ff]write-line[/color] [color=#ff0000]([/color][color=#0000ff]strcat[/color] [color=#ff00ff]"_.OPEN \""[/color] dwg [color=#ff00ff]"\""[/color][color=#ff0000])[/color] f [color=#ff0000])[/color] [color=#ff0000]([/color][color=#0000ff]write-line[/color] [color=#ff0000]([/color][color=#0000ff]strcat[/color] [color=#ff00ff]"(load \""[/color] lsp [color=#ff00ff]"\")"[/color][color=#ff0000])[/color] f [color=#ff0000])[/color] [color=#ff0000]([/color][color=#0000ff]write-line[/color] cmd f[color=#ff0000])[/color] [color=#ff0000]([/color][color=#0000ff]if[/color] save [color=#ff0000]([/color][color=#0000ff]write-line[/color] [color=#ff00ff]"_.QSAVE"[/color] f[color=#ff0000])[/color] [color=#ff0000])[/color] [color=#ff0000]([/color][color=#0000ff]write-line[/color] [color=#ff00ff]"_.CLOSE"[/color] f[color=#ff0000])[/color] [color=#ff0000])[/color] [color=#ff0000])[/color] [color=#ff0000]([/color][color=#0000ff]close[/color] f[color=#ff0000])[/color] [color=#ff0000]([/color][color=#0000ff]princ[/color][color=#ff0000])[/color] [color=#ff0000])[/color] I have discovered now that some of the drawings which had the macro applied had blocks. All elements aside from the blocks were changed to colour 140. Now I want to improve my macro, or lisp routine, such that all elements within blocks are changed to colour 140, along with non block elements. Is there a way to automate the changing of block definitions with repect to nested object colour?? Would greatly appreciate some insight on this problem.
×
×
  • Create New...