Jump to content

Search the Community

Showing results for tags 'macro'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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


  • Programs and Scripts
  • 2D AutoCAD Blocks
  • 3D AutoCAD Blocks
  • Images
    • Backgrounds

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...

  1. I found valuable lisp for auto creation block. I want to improve this lisp to following requirement * block selected object individually, not in one block thanks AUTO-BLOCK.LSP
  2. Hi, I'm having a hard time figuring out how to make a toolbar that can be downloaded for all to use. My problem is how do you share a "common directory" with the world? The toolbar works perfectly fine on my computer, because I have defined my own directory in the macro under the cui command. So the question is: how do you make a "common directory" so that the toolbar can be accessed on any computer? I hope I have made myself clear. Thanks!
  3. Hi everyone, I'm new to using macros/lisps in AutoCAD, though I do have a small programming background in some other programs. To give you some background on what I'm trying to do: I have a big .dwg file that shows all of the roads in a particular city in the USA, and I have created views of all of the intersections that have crosswalks. All of these intersections have their own intersection IDs, which have a format such as BRI1, BRI2A, BRI3B, BRI4, BRI5, etc. I have already created all of the views from these intersections (of which there are over 100), and now, in the same .dwg, I am
  4. roldy

    Move a spline using a macro

    I am needing to copy and move a spline in a sketch without using the spline's ID. Within the macro code, I have defined the selected spline in the sketch to a SketchSegment variable. Any help would be great.
  5. Hi. Can someone please help me, tell me or explain to me how to create new layer with macro. I want define a new button which when I push it will make new layer and ask me for define name and colour of new layer. I'm kind a new to this. I found only this code using LISP. But I want macro for button. (defun c:SetLayer (/ name col) (if (setq name (getstring t "New layer name: ")) (if (tblsearch "LAYER" name) (progn (prompt "Layer already exists, set as current.") (setvar "CLayer" name)) (if (setq col (acad_colordlg 7 nil)) (progn (entmake (list '(0 . "LAYER")
  6. Hi, I'm new to AutoCAD. I have 700 drawings in AutoCAD. I have to enter "Checker" value in the drawing title block. For all the drawings, its the same value. How to I automate this? I don't want to open manually individual drawing and fill the value. Any macro available for this? Please help. Regards, Prasanna.A
  7. Hey guys! I am working on a macro where the user will click the button, the macro opens a script to open a new drawing with a client template, after that it'll load a couple of lisps and run those to setup the standard layers and automate the drawing layout portion. I am fairly new to this, I have noticed that the macro quits as soon as the script runs opening a new drawing. Is this a limitation with running a macro?
  8. Hello.. Not familiar with autolisp or scripts I work for a earthworks company, and we are looking for a way to have an excel worksheet to update progress completion by coloring a property another colour in autocad. Example - lot 1 10% complete, and lot 10 is 30% complete as per excel data. I would like lot 1 (10%) to be light green and lot 10(30%) to be a darker green and darker shades for higher % completion and for the autocad drawing to update as the excel data sheet is updated. I have aproximatly 400 lots to program in this way if possible. Each lot will have 10 conditions (ie 10%,
  9. I'm trying to write either a script or a macro to make it easier to do an array that we will need to replicate on a regular basis. Basically, I want a path array to offset mtext every 20m along a centreline. If I do this in the command line, it's fine: ARRAY select object PA [path] select path curve M [method] M [measure] I [item] 20 [distance apart] F [fill length of path] A [align to path] Y [confirm] X [exit] If I do this in a script or macro, I encounter a difficulty in that the type of array is limited to polar or rectangular. It doesn't even register that path
  10. Hi, I am trying to get some advice on the best way to hatch multiply poly lines in any particular layer. I do not want to manually hatch each poly lines as there are dozens in multi files and was hoping to get some help with a simple script. I have attached an example of what I will be working with the layer I wish to hatch is 1129. Any help would be greatly appreciated. Cheers bend nb120.dwg
  11. ILoveMadoka

    Solidworks Macros - 2 Part Question

    1) Are there any SW API Power Users Here? That could help modify macro code? 2) Are there any sites that anyone can recommend similar to CADTUTOR specific to solidworks (More specifically Macro programming/editing) I find a lot of blogs but not a lot of interactive type sites.. I know there are some experienced SW users here but I am trying to learn more about Macro creation/modification. Here is an example: I have multiple details in a SW drawing that each have "Detail X" on one line and "Scale 1:2" on the second line. I have to make the "Detail" text one size, the "X" ano
  12. Hello, I'm a new user about autocad and new user about this Forum. I try use VB and CAD... Is there a solution for my problem in object? i just write code for MSGBOX: Dim Variabile As Integer Variabile = MsgBox("Hai esportato i parametri?", vbOKCancel) If Variabile = 2 Then ActiveWindow.Close and work if use a macro....but for insert this message when close a file? can i make a particular macro for this like excel or access??? thanks for You interest
  13. This is not so much an issue as an addition to the knowledge base here. If someone has had this issue before, I couldn't find it. An associate here was trying to add a couple of PIs to an alignment. When he pulled up the geometry editor toolbar, most of the buttons were greyed out and none of them worked. Part of the troubleshooting SOP is restarting AutoCAD, during which he got a message about enabling macros. The first time he had answered No. This time he said Yes, and the geometry editor worked. So be warned. There are some commands in Civil 3D that depend on macros.
  14. Hi Is there a way to create a macro which would find the inertia of a region out the (0,0)? Currently, I have to Massprop the object, draw a line from (0,0) to the centre of the object, move the object from the end of the line to the centroid, and then massprop it again to get the correct Ixx and Iyy values. I have looked into creating a macro for it, but I don't know how to use the initial centre values to move the object to (0,0). Is there a way to do this via amacro? If not, is there any other method unknown to me to find the Iyy and Ixx values of an object as if it is sitting
  15. Hello everybody, I've created a macro for creating different dimension styles for different scales. We are using these dimension styles in our company. It works well if I use it in a new, empty drawing. But if I use it in an excisting drawing with a dimension style with the same name, I have got a problem..... I'll see this in the command line; "Enter name for new dimension style or [?]: "scale 20" That name is already in use, redefine it? :_dimclrd Invalid option keyword. That name is already in use, redefine it? :" "_dimclrd" should be the next command in the macro, but
  16. I am a pipe drafter using FabMEP15 when I need a fitting we have ITM button Menu where I can use my mouse to select the fitting ITM that I need. Instead of selecting the Fitting itm icon with my mouse I would love to instead type a command that would select the itm instead is this possible? I don't care how long the command is, because I would make the command into a macro using my gaming mouse.
  17. Hi! I would like a macro which will add a text attribute from an x-ref file to another block attribute which is up to 1.5m around the x-ref element. example: Attribute block: WF-PC-L2.0-095 X-REF attribute: L2.0-0368 I' d like to add L2.0-0368 to WF-PC-L2.0-095. The distance between the 2 attributes is no more than 1.5m perimetrically. I guess coordinates can be the common reference, but i am not faamiliar with coding..
  18. Is it possible to create a macro, and turn that macro into a keyboard shortcut that will THAW, your most recent turned off layer, or layers if multiple were frozen at the same time? This would be super helpful if somebody could help me out here! Thanks, Matt W.
  19. HI Is there a way to run a macro using keyboard shortcut key (acad.pgp)? I would love to add the following to the PGP file if possible. I added the following to the DIMLINEAR command button and it works: ^C^C-layer;Set;DIMENSIONS;;^C^C_dimlinear\\\\ ^C^C-layer;Set;0;;^C^C I found this one that is better than the one i made for the dimlinear button: ^C^C_setenv;CURRENTLAYER;$M=$(getvar,CLAYER);CLAYER;Dim;_dimlinear;\\\ CLAYER;$M="$(getenv,CURRENTLAYER)"; Thanks DRBJR45
  20. 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
  21. Hi guys, long time no post. I have a LOT of drawings all with the same block in and I have updated the block so therefore want to redefine all the blocks, ...as you do. I only have autocad LT 2010 so havent got the LISP coding option. I am trying to do it by assigning the following example code to a button and running it. The only problem is it doesn't run it properly... block name for example is 'box' C^C^_-insert;box=C:\users\michael\desktop\box.dwg;y;C^C^ All the individual lines work when typed but when used in the button macro it stops at: C^C^_-insert;box=C: ...an
  22. I keep doing the same commands over and over and I think i can use a macro to take some of the work out of my repetitive task. I pick "spline" and then type "near" (osnap), pick the first object then pick a spot in space then type "near" (osnap) and pick last object (end of routine). so would the macro look something like: ^C^C_spline;near;\\near;\; Thanks, Steve
  23. I'm just learning how to utilize recordable macros. I have a simple one that I found how to assign to a tool palette by simply changing the properties command string to "^C^CBottom" and "^C^CTop". These are the titles of the macros I created. The article I found explaining this said you can also assign a shortcut key using the aliaseditor but it does not recognize it as a valid command. Is there a way to either use the aliaseditor or the CUI to assign a shortcut for these recoded macros? Thanks, -Nobull
  24. Jrbuds

    Macro Help

    Hi, I am trying to create a macro (or lisp) and am struggling to find how I would do it. Basically what I want to achieve is this: Click Custom button, Click first point (p1) Click second point (p2) Insert block at p1 and set scale to equal distance between p1 and p2 Set bearing to the bearing between p1 and p2 then end. The process will take 3 clicks including click the custom button. This is to basically speed up inserting doors. I was thinking possible making it draw a line when you click p1 and p2 then use this line to grab the start of line, end of line and beari
  25. I have generated the following Macro in a drop down menu for quick insertion of some of my company's standard blocks. I want to know how to add the function explode to the command so as soon as I have placed the block using the macro it exploded on placement or selection of the macro. ^C^C-insert;F:/Blocks/CAN.dwg
  • Create New...