Jump to content

Search the Community

Showing results for tags 'command'.



More search options

  • 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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 40 results

  1. TWO THINGS HERE 1. How can I get the pause to be only asked once in the while loop. 2. Unknown command "MW". Press F1 for help. comes up for the last 2 commands. CODE FOR CREATING MULTIPLE WIPEOUTS: (defun c:mw ( / sset countn n *error* cmde os smode ) (defun *error* (errmsg) (and acDoc (vla-EndUndoMark acDoc)) (and errmsg (not (wcmatch (strcase errmsg) "*CANCEL*,*EXIT*")) (princ (strcat "\n<< Error: " errmsg " >>")) ) (setvar 'cmdecho cmde) (setvar 'osmode os) (setvar 'selectsimilarmode smode) ) (setq acDoc (vla-get-ActiveDocument (vlax-get-acad-object))) (or (vla-EndUndoMark acDoc) (vla-StartUndoMark acDoc)) (setq cmde (getvar 'cmdecho)) (setq os (getvar 'osmode)) (setq smode (getvar 'selectsimilarmode)) (setvar 'cmdecho 0) (setvar 'osmode 0) ; MULTIPLE WIPEOUT (princ "\nSelect items: ") (setq sset (ssget '((0 . "LWPOLYLINE")))) (if sset (progn (setq n (1- (sslength sset))) (setq countn -1) (while (< countn n) (setq countn (1+ countn)) ; HELP HERE ; TWO THINGS HERE. ; 1. How can I get the pause to be only asked once in the while loop. ; 2. Unknown command "MW". Press F1 for help. comes up for the last 2 commands. (progn (command "._wipeout" "_polyline" (ssname sset countn) pause) (command "_.change" (ssname sset countn) "" "properties" "color" "T" "255,255,255" "") (command "DRAWORDER" (ssname sset countn) "" "back" "") ) ) ) (princ "\Sorry, no closed lwpolylines selected. ") ) (setq sset nil) (*error* nil) (vl-load-com) )
  2. Hi, I need to run a scrit on multiple files and I would like it To chose wich SCR to run bas on the begining of the Name of the DWG File. In this case i have file with 2436, 3648 etc... and my scr would need to run the 2436INS.SCR on the 2436 ans same thing with the 3648 etc... I have try using Script Pro 2.0 But as it's openning a new file that has nothing in it it wont run proprelly the srcip. Here's my .scr Also Got it in Macro Command I would at least be able to run it in Script Pro but if someone is able to make a.bat or a lisp quith that it would be so fantastic I'm really sorry for my bad english! Thanks to every one!
  3. When I enter a command quickly, it will sometimes duplicate my input into the command line. Example: after selecting, if I press "m" for move, and quickly follow it with spacebar to confirm, I will be prompted to enter a base point. Sometimes, it will input an "m" in the command line in the place where I'm supposed to enter the point. I then have to backspace it before I can pick a point. This is happening with other commands too. If I type "line" then follow the last letter quickly with a spacebar (or enter), it will ask me for the line startpoint, with the prompt immediately followed by "e" (which is the most recently input character). It seems to happen more often if I have something already selected, and I have only seen it happen when a command is requesting a point. It isn't reliable, meaning it doesn't happen every time for any command. I thought it was a problem with the keyboard because it recently had liquid spilled on it, but I tried plugging another one in and it also acted exactly the same. It's a new problem that I've never seen before today. I can't get it to happen in any other programs, so I don't think it's my input. It also happens when I open a new drawing. It doesn't happen, however, on any other computers here, only mine. I thought it might be a LISP interaction, but it continued even after disabling all custom routines. Despite being a minor issue, it's slowing me down dramatically. For reference, I've attached an image of what's happening. I didn't enter the "c" in the command line, except previously when entering "sc". Has anybody ever had this happen before, and do you know of a possible cause/solution?
  4. 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") '(100 . "AcDbSymbolTableRecord") '(100 . "AcDbLayerTableRecord") '(70 . 0) (cons 2 name) (cons 62 col))) (prompt "Layer created and set current.") (setvar "CLayer" name))))) (princ)) Thank you for your time guys and have a nice day
  5. Is it possible to select objects by layer using only the command prompt, I know it is possible to select objects by other means but I'm specifically trying to use the command prompt to run a script which will go on to cleanse dxf files. If not, does anyone now of a lisp routine which would enable this to work? Can lisps be called in scripts (have never tried)? Trying to select objects (blocks) to scale them to their correct size, now I'm sure their are other ways of doing this too but for some reason these particular blocks are "phantom" for want of a better word. And, cant be edited by double clicking them! The general idea is to cleanse the data as much as possible (set layers, colours etc) with no input from the end users. Hope the above is clear and thanks in advance for any and all help
  6. Hello, Does anyone with LISP programming ability know of a LISP or could make one that when you: - Run the command - Select the keynotes - Hit space bar - Select the text - Space bar again and they will magically align? I have spent at least 30minutes per project when there are 40 keynotes.
  7. The below test code doesn't show the new location of pt2 where the cursor is. Anyone know how to get it to work. DRAGMODE varaible is set to ON. (defun c:test (/ rec1 rec2) (setq rec1 (getpoint "select first ")) (setq rec2 (getcorner rec1 "select second")) (setq pt1 (getpoint "\nSelect Base Point : ")) (setq pt2 (getpoint pt1 "\nSelect Second Point : ")) (command "stretch" "c" rec1 rec2 "" "_non" pt1 "_non" pt2) )
  8. Having already asked with no replies some time ago, I thought I could give it a try once again. When I run my lisp routine which begins with (command "_.undo" "_BE") and ends with (command "_.undo" "_E") and for any reason I press "u" I get the annoying message (Lisp Expression) multiple times at the command prompt. Is there a way to hide this repeated message or get rid off it with any other way? Thank you.
  9. Hello all, I wondered if it's possible to have a kind of command or lisp that gets the continue and baseline command in one single command? In the picture below you see the result I need in one command. Now it is done in 2 commands and it's taking a lot of time. Can somebody help me? Thanks! Kind regards, Martin
  10. Hi all, First poster here! Thought I would start of with something small. Does anybody know how to create a (new) Quick Leader command that has a DOT arrowhead default? I have tried to play around with the command macro (^C^C_qleader) but to know avail. Any help will be greatly appreciated. Have a great day and thanks for stopping by:D. Buzzy
  11. Hi very new to Autocad here - I've just downloaded Autocad onto my laptop, but my laptops number keys don't work so I am using my online keyboard viewer for numbers. When drawing in Autocad and putting in dimensions, is it possible to do it with an online keyboard? Because everytime I want to type in a number in the command section, I have to move my arrow to the on screen keyboard and select the numbers and this makes the line move aswell. Any suggestions??
  12. Hi, I want to prevent a layer from being plotted and I have found a few ways to do this but which way is the best? 1. (command "_.-layer" "p" "n" "LAYERNAME" "") 2. (defun PlotLayer2 (layerName bool / en output) (if (setq en (tblobjname "LAYER" layerName)) (progn (entmod (subst (cons 290 (if bool 1 0)) (assoc 290 (entget en)) (entget en))) (setq output T) ) ) output ) 3. (defun PlotLayer3 (layerName bool / acadObj doc layers layer output) (setq acadObj (vlax-get-acad-object)) (setq doc (vla-get-activedocument acadObj)) (setq layers (vla-get-layers doc)) (setq layer (vl-catch-all-apply 'vla-item (list layers layerName))) (if (not (vl-catch-all-error-p layer)) (progn (vla-put-plottable layer (if bool :vlax-true :vlax-false)) (vlax-release-object layer) (setq output T) ) ) (mapcar 'vlax-release-object (list layers doc acadObj)) output ) I know that it doesn´t play a big role in this example, but which is the best programming technique theoretically? Is it needed to release the objects in PlotLayer3? Thanks in advance!
  13. Has anyone had the issue of your command line not working if you have a p-line/object selected and your cursor is over the same object? sometimes this will cause the object to adjust after you try to start a command, but the command won't start. I just get a beep signaling an error, but no message. Does anyone know of a setting to fix this annoying issue?
  14. Hi everyone, I'm currently writing a C# plugin for AutoCAD. I have a form containing several buttons among other things. One minor function I would like to add is to open the Group Manager via my custom created button inside that form. Now my problem is I can't seem to figure out how to access or find that command. Any ideas how I can open the Group Manager by code? -Mike
  15. Just now I moved an object. I panned and zoomed to see how it looked. I changed my mind and tried to undo the move. I had to undo dozens of phantom commands (listed as "group of commands") to get back to the move, when I should have had to undo only a couple of real commands. This is not an isolated incident. Looking at my Undo log, there may be no phantom commands for one real command, for another two, for another fifteen. There doesn't seem to be any correlation between the type of command and the number of phantoms. Is this something only Civil 3D does? Do I have a gremlin?
  16. My company is switching to a 'miniframe' system for our network such as this: http://www.miniframe.com/KB/OnlineHelp/hardware_requirements.html Basically there is one main computer handing the Autocad and we still have our own workstations. the problem is, I have my own custom commands in the acad.PGP file, and apparently, if I alter the command aliases, it will change for everyone else. Is there a work around for this where I can have my own custom aliases WITHOUT affecting the rest of the company? or else I will have to use the standards which are terrible.
  17. GuyWalker

    I Lost My Command Line!

    Hi all, Pretty basic/noob question, my command box has mysteriously vanished (more than likely my own doing) and I would really like it back! Where can I find it! cheers!!
  18. Solved! See the first response below to see the solution. (RobDraw's post) Hello, recently last night my mirror tool did not easily snap or flip to what I was trying to do in the red box shown in the picture below: It can do any other angles but the other angles use to let it flip above/below the x-axis. Is there a way to fix this? I do not know how it got changed since it also affected my rotate tool to not rotate at 90° and I had closed the program so I lost the command history to see what caused all of this. I already reset AutoCAD settings to default and restarted my computer. I was able to fix the other tools in snap settings but mirror is the only one left and I use this command the most. I know I can use the rotate tool, but on educational purposes, I was wondering if I can change it back or was I using it incorrectly all along? I tried to search online but I do not know much of the terminology to get the right keywords. Any insight of how to phrase for my search will be grateful as well. Thank you.
  19. Lee Chu Chu

    Lisp Command Reactor

    I want a command reactor to be able to activate inside a function however I am not sure if command reactors work with a user defined command or function. For an example, I want to be able to get the reactor to work on some (defun c:drawsomething () ....) and I want it to look for when the command drawsomething is called up? Can someone please point me in the right direction.
  20. When I initially startup cad i see this... Regenerating model. Command: Command: Command: Command: Command: Command: Command: Command: AutoCAD menu utilities loaded. Just curious as to how to debug to find out whats causing this so I can silence them or hide them. I have tried a couple things but haven't concluded yet. Any help is appreciated. God bless
  21. Nobull84

    beginner lisp help

    I'm not sure the correct wording of what I'm trying to do so google hasn't been too helpful. I have a command that invokes a dialog box with the option to "edit" an object, among other things. I'm looking to automate some things. I want to run the command, (Defun C:bbb () (command "BEAM") Then select the option to edit, (don't know where to go here...) Then choose "select previous" and confirm the selection. If I could get that far I think I could get the rest regarding adding this to a double-click feature in the CUI.The ultimate goal of this for me is to double-click the "beam" and automatically open this dialog box in the edit mode and skip the steps of calling out the "BEAM" command, click edit and then select the beam. I'm trying to learn how to call out options within a dialog box using lisps as most of the commands I use all day have a dialog box that is used after beginning the command and then options after that. Hopefully this is clear enough for someone to understand. If not, I'll try to supply more info that I can. Thanks, Nobull, i.e. "Noob"
  22. I'm a newbie. And i try to practise some Autolisp example. I write the code below to know how to use entity name in applying command. I collect these entity name in a list and use command "erase to delete it". But some problems happened here. It said " Bad arguments" and i don't know how to resolve it. (defun c:gc (/ p1 p2 data n index) (setq p1 (ssget)) (setq data()) (setq n (sslength p1)) (setq index 0) (repeat n (setq p2 (ssname p1 index)) (setq data (append data p2)) (entmod data) (setq index (+ index 1)) ) (command "erase" p2 "") )
  23. knafziger

    AutoCAD 2013 LT Command prompt

    Hi There, I seem to have lost the ability to use short-form commands in the command prompt. I was able to do it, and not I can't. I don't know what changed. For instance.... I can type in 'LINE' and the line command will initiate; However, I cannot initiate the line command by typing in 'L'. I have tried to change it through the CUI with no luck. Other commands like, move and copy are effected too. Please help!
  24. Just seeing if someone knows how to change the DTEXT command to be typed on a specified layer. I have poked around and came across some macros editing but this did not do the trick. Super thanks in advance! [&DText]^C^C-layer;s;TEXT;;dtext;
  25. Hello everyone, I am having a bit of an issue when using the AREA command. I've noticed that the UCS (User Coordinate System) changes when I attempt to take the area of an existing object (when I trace over a rectangle, for example). The changes to the UCS are dramatic, the drawing zooms out and rotates depending on how I traced the object. The change occurs when I click the third time. This reminds me of setting a new UCS where you would first select the x-axis direction with two clicks followed by the direction of the y-axis with one click. There is no change to UCS when I trace out an arbitrary shape. Here's what I've been able to figure out and it involves the UCSFOLLOW setting. When I set the UCSFOLLOW variable to 0, everything works great and I don't get the zooming out and rotation. When it's set to 1, well, the PLAN VIEW changes by zooming out and rotating. If I zoom back in and complete the area and press enter, everything goes back to normal. So I still manage to get the area of the object that I want, but the zooming out and rotation makes it very inconvenient. Okay, I understand that the UCSFOLLOW solves the problem, but is it normal for the AREA command to make changes to the UCS by default? I ask because creating a new drawing, creating a rectangle and using the AREA command doesn't cause the same UCS change, regardless of the UCSFOLLOW setting. This makes me think the drawing I am working on has objects with a coordinate system that differs from the WCS, right? Is there a way to have the UCSFOLLOW active while not having the AREA command alter the UCS? If I left crucial information out, please let me know, and I'll elaborate! I'm using AutoCAD 2012. Thanks!
×