Search the Community
Showing results for tags 'command'.
-
how to use linear path array command in autocad 2009
-
I’m using AutoCad 2023. I used Aliasedit command to get all the list of command keys in CAD because used to type more than navigate through the ribbons. anyway. I got 9 pages of the list but It did not list all the commands for example not much on ISO tools. How can I get full list of commands or do I need to manually add them on my Cad? What are your techniques. Thanks
-
_ColorOffsetV031 Unknown command "COLOROFFSETV031". Press F1 for help.
AM-AP posted a topic in AutoLISP, Visual LISP & DCL
Hi there, I'm AM and new to the forum I'm creating a set of easy lisp routines for my team. I've loaded the following lisp file into AutoCAD and it works fine when typing the function ColorOffsetV031 into the command line within AutoCAD. However, when I try create a new command that will run the lisp with a macro like ^C^CColorOffsetV031 or ^C^C_ColorOffsetV031 so I can then add it to a ribbon/tab/tool palette, I get the following error: "_ColorOffsetV031 Unknown command "COLOROFFSETV031". Press F1 for help." I'm honestly not sure what I'm doing wrong. I've tried different ways of loading the lisp file, from just dropping the file into AutoCAD, adding it to the Startup Suite, loading it as an application etc. I've created 'buttons' like this before, and I feel so silly asking such a simple question; It's probably something really simple that I just can't pick up on... Even if someone can point me in the direction of a related post from someone else I would be very grateful The lisp: ; Define the tool/function name and variables (defun C:ColorOffsetV31 ( / EName EInfo EColor Group ans ansColor) (setvar "CMDECHO" 1) ; Set the options for user choice (initget "Orange Red Yellow Green Cyan Blue Magenta White L-Grey") ; Ask for user input on color for offset (setq ans (cond ((getkword "\nChoose offset object color [Orange/Red/Yellow/Green/Cyan/Blue/Magenta/White/L-Grey] or ENTER for Orange")) ("Orange"))) ; Set ansColor as input color (cond ((= ans "Orange") (setq ansColor 30)) ((= ans "Red") (setq ansColor 1)) ((= ans "Yellow") (setq ansColor 2)) ((= ans "Green") (setq ansColor 3)) ((= ans "Cyan") (setq ansColor 4)) ((= ans "Blue") (setq ansColor 5)) ((= ans "Magenta") (setq ansColor 6)) ((= ans "White") (setq ansColor 7)) ((= ans "L-Grey") (setq ansColor 8)) ; Should not happen but just here incase no input is given, set ansColor to BLACK (t (setq ansColor 250)) ) ;----------------------------- ; Start OFFSET (command "OFFSET" pause) ; Do the following with OFFSET (while (= 1 (logand 1 (getvar "CMDACTIVE"))) (command pause) ; While OFFSET command is on (while (= 1 (logand 1 (getvar "CMDACTIVE"))) (command pause) ; Set the current entity to be used as the last clicked entity (setq EName (entlast)) ; Get entity info (setq EInfo (entget EName)) ; If the colour of the object isn't known (if (not EColor) ; Match ans to EColor (setq EColor ansColor) ) ; Change the colour (entmod (append EInfo (list (cons 62 EColor)))) ) ) (setvar "CMDECHO" 0) (princ) ) Here's a copy of the command itself too Thanks, AM- 10 replies
-
- lisp
- unknown command
-
(and 2 more)
Tagged with:
-
How to use Wire Copy (AECOPYWIRENO / WD_COPY_WN) in LISP
NicholasCAD posted a topic in AutoLISP, Visual LISP & DCL
(Hopefully this Question has not been asked. The Search gave no Results.) For Context: I have created a Program that generates a complex Component (Block, Wiring, Text) onto a Sheet. The Program uses .LSP and .DCL for ease of Use for our Operators. The Prompt has Options to configure the Component to any Options we need. Inquiry: I need to update the Program to include Wire Numbers and Wire Number Copies. (I will be trying to use "WD_PUTWNXY" Command for New Wire Networks, although I have yet to do so.) For Wire Number Copies, I was hoping to use either the "AECOPYWIRENO" or "WD_COPY_WN" Commands. The Problem with these Commands is that they do not allow for Coordinate Placement. When running either Command, the Command Line is requesting to select a Wire as an Entity. What I would like, is an example of a LISP that completes this Task using a Coordinate System to select and place the Wire Number Copies. Any Advice would be much appreciated! -
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?
-
create dropdown menu in autocad to select commands
Manuel_Kunde posted a topic in AutoLISP, Visual LISP & DCL
Hi all, I am trying to write a lisp that will create a DropDown list in Autocad. With the selection from the fields I want to execute different commands that I have defined before. (defun c:create_dropdown () (setq choise1 command1) (setq choise2 command2) (setq choise3 command3) (setq choise4 command4) (strcase (initget (getkword [choise1/choise2/choise3/choise4])))) ) -
How to pause for user input in while and run more than 1 command call
3dwannab posted a topic in AutoLISP, Visual LISP & DCL
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) ) -
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!
- 7 replies
-
- lisp
- insert block
-
(and 3 more)
Tagged with:
-
Quickly entering commands tampers with the input
benhubel posted a topic in AutoCAD 2D Drafting, Object Properties & Interface
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? -
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
-
selecting objects by layer
Jamez posted a topic in AutoCAD 2D Drafting, Object Properties & Interface
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 -
.....
-
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) )
-
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.
-
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
-
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
- 4 replies
-
- command string
- command
-
(and 2 more)
Tagged with:
-
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??
-
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!
-
Command line wont accept input if an object is selected and cursor is over the object
bh_ONE posted a topic in AutoCAD General
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?- 8 replies
-
- command line
- command
-
(and 1 more)
Tagged with:
-
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
-
- plugin
- group manager
-
(and 3 more)
Tagged with:
-
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.
-
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!!
-
Mirror command cannot flip horizontally
Kittie posted a topic in AutoCAD 2D Drafting, Object Properties & Interface
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.- 12 replies
-
- horizontally
- flip
-
(and 2 more)
Tagged with:
-
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.
-
Why so many Command: Command: Command: on startup?
tmelancon posted a topic in AutoLISP, Visual LISP & DCL
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