Jump to content

Search the Community

Showing results for tags 'script'.

  • 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...

  1. I have created a .cuix file that I would like to apply to AutoCAD2015 for each user on the network, so that I do not have to log in under each name and manually transfer in the CUI one at a time. So far I have tried multiple methods for loading the custom .cuix file into AutoCAD on launch, however I am unable to get the workspace to transfer in at all. I have created an acaddoc.lsp file, saved into a support file path, that calls another .lsp file to load in the cuix, based on code I have seen on this forum: (command "cuiunload" "FILENAME" ^C "cuiload" "X:\XX\XXX\FILENAME.cuix" ^C) However my new workspace is never added into the program after successfully calling the LSP when CAD launches. I have also messed around with ARG files and using a switch to call on a script upon launching CAD, although I so far have not had any luck. I am a novice at writing scripts for AutoCAD and navigating the program's folders, so please let me know if I need to provide any more detailed information. I appreciate any help that someone has to offer. Thanks.
  2. Hello everybody! Few programmers (including myself) decided to create a website with free (for now) AutoLisp programs and scripts for Autocad. Well, we have few questions to define where to start. Your answers would really help. - Do you use programs (scripts) in your work? - Which program (script) you would use but do not have. Best regards, ... PS Link to website asap
  3. Hi all I really do not have much experience with AutoLISP but I would like to write a script that allows me to: 1. Create a new DWG 2. Draw a line from a set of existing coordinates from a .txt file 3. Save this drawing in a specified location 4. Close the drawing 5. Rinse and repeat until all of the .txt files have been drawn. Basically this will be used for hundreds of .txt files containing coordinates to draw the cross-sections of a tunnel. Is this something that can be done? As after hours of research I have only managed to be able to draw one cross-section using a batch file but haven't been able to close the drawing or save it. Thanks in advance for any help
  4. Hi, this is my first post on the forum & I'm also pretty new to AutoCAD scripts & Lisp routines, so please bear with me. Basically I have the following script: (setq dn (strcat (getvar "dwgprefix") "New Drawing.dwg")) (vl-propagate 'dn) _.saveas 2010 !dn This script saves my current drawing as 'New Drawing.dwg' within my current directory, and works fine. When I try to modify the script to the following, which attempts to open instead instead of save, it doesn't work, just prompts for drawing name: - (setq dn (strcat (getvar "dwgprefix") "New Drawing.dwg")) (vl-propagate 'dn) _.open !dn The saveas & open dialogues look very similar, so please could someone explain why I can reference a variable for the _.saveas filename, but not for the _.open filename, or have I got the syntax completely wrong for the _.open command?
  5. Hi guys! I try this http://askjerry.info/weird_gear/ to get a gear of two SQUARE tooth wheels. I have downloaded and installed ACAD especially for the project. For now I could run the script to get a result curve (made out from big white wheel on the left) for primitives (triangle, square, ellipse, etc.) I draw in small red circle on the right. Almost everything seems to be okay but when I try to paste there (to the right red circle) ready made and complicated pattern (tooth wheel) from another CAD software the script goes ERROR. Where my mistake is? Please answer in most common words to let me know you’re interested in further conversation. Then I put more specific and detailed questions. Truly, Alex.
  6. I've made this script to adjust the extensions on our rectangular transition ducts but it doesn't want to work for me. Everything is fine if I keep it simple and leave out the " Or "Ductmate 35" " part but for this to work, I will need the or statement. Anyways, here's the script... select item.cid case 2 dim extin = item.dim[6].numvalue dim extout = item.dim[7].numvalue dim con1 = item.connector[1].value dim con2 = item.connector[2].value if ( con1 = ("TDC" or "Ductmate 35") ) and (extin < 2 ) then item.dim[6].value = 2 end if if ( con2 = ("TDC" or "Ductmate 35") ) and (extout < 2 ) then item.dim[7].value = 2 end if if ( con1 <> ("TDC" or "Ductmate 35") ) and (extin < 0.5 ) then item.dim[6].value = 0.5 end if if ( con2 <> ("TDC" or "Ductmate 35") ) and (extout < 0.5 ) then item.dim[7].value = 0.5 end if item.update() end select Can anyone spot the problem? I'm hoping its an embarrassingly simple one.
  7. Hi, I am working in Fabrication and am trying to make a lisp that will select all items of a certain cid# (4 and 61) and then run a ctext on them. The lisp is also supposed to run a script at the same time, but that part works fine. This is my code so far... (defun c:etag() (setq ss (ssget)) (setvar "pickfirst" 1) (sssetfirst nil ss) (executescript "Elbow Tagger.cod") if item.cid = 4, 61 then (addctext "AMCI-Full-Elbow-Tag") end if end select) Currently, this lisp will apply the ctext to very part selected. I am only familiar with VB so I was a little lost when trying to tell the lisp to select cid#
  8. First post so cut me some slack if this isn't in the right spot! I have software that creates a script file and essentially dumps circles into AutoCad. The manual part is using rulesurf to connect them (each circle has a different 'z' elevation - and x,y for that matter). Basically, I'm trying to further automate the process and create the 3D image with minimal user input. I've played around with the rulesurf command in the .scr file but I'm not having any luck. Two of the circles and the rulesurf attempt is below - I add the radius of the circle to the center point's 'y' value in order to select the object circle 3.76,-4.83,-190.00 59.00 circle 3.72,-5.03,-310.00 59.00 surftab1 30 rulesurf 3.76,54.17,-190.00 3.72,53.97,-310.00 The weird thing is, when I look at the command window after the failed attempt, I can see my x,y,z point I use to find the circle being rejected When I type the x,y,z point in manually it never has issue finding the circle. I'm using ACAD 2015 with a acad3D.dwt file. Any advice would be great as I'm just getting started with my dive into .scr files and the POWER they hold! Recommended readings would be awesome too. I'm a darn good drafter now working on my engineering degree - so I'm not afraid to learn or take criticism! Thanks
  9. HI, I HAVE A SIMPLE SCRIPT FILE THAT PRINTS SPECIFIC TABS INSIDE A CAD FILE, IS IT POSSIBLE TO CHANGE THIS TO MAKE IT PLOT MULTIPLE TABS "LAYOUTS" IN THE SAME FILE, BASICALLY WILL BECOME EQUIVALENT TO A PUBLISH "BATCH PLOT" COMMAND. -PLOT Y PV2.00 DWG TO PDF.PC3 ARCH full bleed E1 (30.00 x 42.00 Inches) I L N L F Y SoCore_2014.ctb Y Y Y N N Y Y THNX
  10. Is it possible when Activating a project in Autocad Electrical to run a customized script or macro? Specifically, it would be nice to set the "DefaultFormatForSave" variable to the proper customer specified value. Thanks in advance
  11. Hello, I am working on a tunnel alignment. I have to draw multiple closed 3d polylines from AutoCAD Points (which form the tunnel sections from the excavation). I use the 3POLY command and then the option "PN. Is it possible to write a script (or a lisp routine) that repeats this process? For example, I wrote this script 3POLY 'PN 1-10,1 (1 row blank) 3POLY 'PN 11-20,11 It draws the first closed 3dpoly (from point numbers 1 to 10 and closes to 1) but it not continues to second 3poly. Thank you in advance
  12. Hi! I'm looking for a script that does this: insert block from specific (non changing) folder, *type in name of block* no rotation no scaling insert to picked point on screen (meaning- i only want to type the name end pick a point of insertion) any ideas? thanks a lot!
  13. I'm trying to use a script to draw multiple lines (from one to the next) when I have the quadrants (1-4), bearings and distances in a file...but it doesn't resume the line command from the endpoint of the last drawn line--and therefore "tweeks" (at the * in the short sample script below). line 'bd 5000,1000 3 17.5057 164.71* 2 78.072 31 3 10.111 50 3 19.2147 116 4 66.215 297 Any hints on forcing it to keep drawing, as it does when I hand enter these commands? NOTE: The nice thing I DID learn is that you can bi-pass the [.P .N .G] choices by just putting in the x,y coordinates to start, "tricking" it to thinking you used your mouse. However, the script works for the beginning, but doesn't behave the same as my hand entered commands, but shows the following: Specify first point: 'bd >>Select starting point or [.P/.N/.G]: 5000,1000 Quadrants - NE = 1, SE = 2, SW = 3, NW = 4 >>Specify quadrant (1-4): 3 Current direction unit: degree, Input: DD° MM' SS.SS" (spaced) >>Specify bearing: 17.5057 >> >>Specify distance: 164.71 Resuming LINE command. Specify first point: Specify next point or [undo]: 2 Specify next point or [undo]: 78.072 Zero length line created at (5224.647, 81.665, 0.000) Specify next point or [Close/Undo]: 31 Zero length line created at (5224.647, 81.665, 0.000) Specify next point or [Close/Undo]: Enter BACKSPACE to interrupt script. Command: 3 Unknown command "3". Press F1 for help.
  14. Hello I'm getting frustrating with a script I have to write. I've tried it for many times, but there's no way. When I try to run the script from AutoCAD appears "Enter an option". Please, please, can someone tell me what I'm doing wrong? The goal is get the text in blue: This is what I wrote in the Notepad: ;Writteh by: ; -LAYER m Test c Blue s Test -STYLE Lab 05-1 Verdana 0.25 "Lab 05-1" TEXT 0.2500 @8.5,3.8 NOTES: 1. ALL DIMENSIONS ARE IN INCHES. 2. MATERIAL STEEL. 3. REMOVE AL ROUGH EDGES ; ;End of Script
  15. 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
  16. 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
  17. Hi guys, my knowalge of scripts is 0 is it posiable to have script always running when the user do a save as and check in a excel if the file name exist. Thanks
  18. "Find" command gives me a dialogue box. Then everything falls apart.(program stops). Have not found any samples except VBA and lisp files. I want to use only "script" files. Any suggections? Thank you very much! Bob
  19. I know this is probably a super easy fix, but I just don't know how to do it. I have a macro that works great in my toolbar and/or ribbon, but I want to make it a script so that I can put it in a program such as Multi-batch and use it on several drawings at one time. How do I convert a macro to a script? Basically what the macro currently does is pop my drawing into paperspace, zoom extents, turn off layers I don't need, and change the Ltscale and psltscale to be correct for printing. Any suggestions would be appreciated. Thanks so much. Here is the macro: ^C^C(setvar "pdmode" 0);_tilemode;0;zoom;extents;ltscale;0.5;-layer;f;*A-ANNO-ENGR,*A-SEAL-ASBESTOS,*A-SEAL-CIVIL,*A-SEAL-FIRE,*A-SEAL-ELEC,*A-SEAL-MECH,*A-SEAL-PLUMB,*A-SEAL-STRUCT;;
  20. 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.
  21. I am trying to open up a document in a script routine, and I know the beginning of the file name (and it is unique) but when I add a wildcard character, the script throws an error. For example, say the file name is Project_1-title.dwg, I want to be able to open that file with ' open "Project_1*.dwg" ', or even just Project_1*. Is there any way of doing this, or must you know the entire file name in order to open the document? Thanks in advance. -Serabis
  22. Hi all, Trying to run a simple script on a bunch of files and am running into trouble. Using ScriptPro and AutoCAD Architecture 2012. I read Lee Mac's script writing tutorial http://lee-mac.com/scriptwriting.html but am not using The Script Writer (which looks pretty super). Macros should change the plot state of a specific layer, "X-CHEK" in this case, to No Plot, save, close the drawing. Here's what I have (after many small and tests): -LAYER P N X-CHEK _.save _Y _.close Results have been mixed. Currently ScriptPro is reporting failed for each drawing, but I know the layer state change was successful for about 80% of the drawings because saving the drawings in AutoCAD increases the file size from 8-10kb to ~80kb. Solution has been to go back and run the script on those unsuccessful drawings. Another strange thing that seemed to happen without warning was that AutoCAD stopped running the script altogether, flashing _.SCRIPT at the command line and closing the drawing without saving. Any ideas what I'm doing wrong?
  23. Hey there! I'm pretty new to scrpits and all programing operations of AutoCAD. I've got this super complex script that I'm trying to run and need some help debugging from one of you fine Gurus. Here it is: -rename block Bald Cypress Red Oak That's it. My problem comes from the space after the word Bald. What I believe is happening is that AutoCAD thinks that the space is an enter. What do you guys think? Is there a way around this? Simple is always good. I spent half the night last night looking for a different way to do this. A Lisp would work, I'm sure, but I don't know how to write one. Thanks!
  24. Hello i would like to have a script that can be batch-applied to multiple drawings to do the following: -vports,2,v visretain,0 reload all xrefs save and close Can somebody please help me with this Thanks
  25. Hi all, I'm new in the forum, but it looks like there are some experts around that can share some knowledge. My problem is the following: I have created a macro in excel that selects a series of points and assigns them some coordinates Easting Northing and RL (X,Y,Z). Then a second macro reorganises all the data and groups it as I need. At the end it creates a script. I'm trying to create some spheres and some 3Dpolylines from the center of the spheres. I think I know how to do that. Since I have X,Y,Z for each point I just got the script to write the following: _Sphere 646063,531851,111 30 text 646093,531881,111 25 0 BH21>> For the polylines I do the same thing with 3Dpoly command. I set my layer, I get the command Sphere, XYZ and diameter. then I add some text. From what I have seen that's the right way to do it. The problem comes when I run the script. It creates the layers fine, it runs the command Sphere but then it crashes because it cannot understand that the numbers separated by "," are actually X,Y,Z. It keeps on asking me to specify the center point for my sphere. I have the feeling that it may have something to do with my AutoCad settings but I'm not exactly sure what. I have searched the web and multiple forums for days with no success. I finally decided to come here and ask people with more experience than me, see if I can get someone to point me in the right direction. Thanks to all in advance!
×
×
  • Create New...