Search the Community
Showing results for tags 'autocad2015'.
-
There are multiple attributes that I want to be able to increment by 1. However there are a couple of problems, there are different attributes but I want to be able to select all of them and I the value that I want to increment by 1 has a letter before it.
- 12 replies
-
- autocad2015
- attributes
-
(and 1 more)
Tagged with:
-
Lisp to select multileader style name and replace
JiffytheSpiffy posted a topic in AutoLISP, Visual LISP & DCL
Ok, I'm at my wits end here ( or maybe I forgot to take my meds ). I can't for the life of me figure out how to do write a lisp command that i can execute when opening a cad drawing. Little history here. I have created standard templates for everyone in my office to use, but some departments like to alter these to fit their needs, which ultimately destroys the whole idea of having standards. I would like help with a lisp command that will do the following. After I open the drawing Run lisp called "Cleanup" that will Select all multileaders by style named horizontal 1 and replace them with H - 1 Select certain blocks and replace them Select certain dimstyles and replace them Is there a way I can have it repeat for different style names that i can edit in the lisp? I have tried using the checkstandards option, selecting and changing all entities a group at a time, and qselect. These options are very time consuming (something I don't have much of) I dont understand how to use the SSGET and SSX commands, let alone create lisp using them. If anyone has any idea please let me know. What i have in mind may not be the easiest way. Thank you in advance!! -
Yesterday by AutoCAD crashed and since then I have been experiencing a number of issues with all of my existing dwg files and any new files I create. The prob is that I am unable to select items (objects/text/lines) before I select the commands. For instance I am unable to select a line and then press delete. I am also unable to select a viewport to lock and unable to select text to edit. I am also unable to copy with basepoint, or copy things in to a new drawing file. However I can delete / move as long as I select the command prior to selecting the item. Has anyone got any solution of how I can resolve this issue? I am experiencing this issue across all of my AutoCAD files, not just one and have an important drawings which was due to be issued to the Client by Monday which I am unable to edit. Thank you in advance for your help.
-
Dynamic block doesn't work as intended in certain drawings
tchwiesz posted a topic in AutoCAD 2D Drafting, Object Properties & Interface
I have a dynamic block with a flip parameter - It works fine in my reference file but when I copy and paste it into another drawing the horizontal flip no longer works. I've tried purging and auditing the drawings but to no avail. What gives? doesntwork.dwg works.dwg -
Dynamic blocks and attributes
tchwiesz posted a topic in AutoCAD 2D Drafting, Object Properties & Interface
I'm trying to develop a dynamic block that takes two attributes input from the user (lets call them "x" and "y") and then divides them by the distance ("dist") of a line within the block that may be stretched. Then the result of this formula ((x + y) / dist) is to be displayed as an M-TEXT within the block definition. The problem I'm experiencing is that no matter what I do I can't convey the value of the attributes to the M-TEXT within the block - It only shows their default values and there's nothing I can do to update it with the current attribute values for the block. In other words: Lets say my default values for "x" and "y" are "0" and "1", respectively. I then change the value of "x" to "10" and "y" to "20" on the instance of the block. My M-TEXT has a field in it that references a "formula", and the formula references object->value for both the x and y attributes: "x + y" as the formula. However instead of showing me "30", the block instead shows "1" as these were my default values. I've attached the file I'm working with as an example (although the fields are named differently than what's here). I've posted the question to AutoDesk's forums as well using a more true example of what I'm doing (I simplified it here because it's been difficult to explain what the problem is), so if you would like to read my other attempt at explaining the problem, check out: http://forums.autodesk.com/t5/autocad-2013-2014-2015-2016/value-of-attribute-doesn-t-show-up-when-used-within-formula/td-p/5878314 WIP.dwg- 10 replies
-
- autocad2015
- attributes
-
(and 1 more)
Tagged with:
-
Get point of when there are no entities selected.
Lee Chu Chu posted a topic in AutoLISP, Visual LISP & DCL
I have this code: (setq PT1 (getpoint)) (setq PT2 (getpoint PT1)) (command "LINE" PT1 PT2) (command) (setq obj1 (entget (entlast))) (setq ent (car (nentsel "\nSelect Entity: \n"))) (cond ((/= ent nil) (setq obj2 (entget ent)) (command "chamfer" obj ent) ) ((= ent nil) (setq PT3 (getpoint ent)) (command "LINE" PT2 PT3) ) ) ) Its supposed to be able to draw a line when if there is no entity it draws the line up till that point where I tried to select the entity. However when I execute this code, it will state that I have an inappropriate data type. How should I modify the code to be able to draw the line from the last point to the point of which I tried to select an entity if an entity doesn't exist at that particular point? -
I want a lisp that when two lines are inserted and they intersect each other at 90 degrees, I want them to create a chamfer
-
osnap only snapping to "top" of object
toonamo posted a topic in AutoCAD 2D Drafting, Object Properties & Interface
in earlier versions of autocad osnap used to snap to all endpoints if i had it enabled. Now osnap only snaps to endpoints that would be visiable if the object was solid. If a endpoint is "through", underneath, or inside a object. I am unable to snap to it. I am using autocad 2015 does anyone know where the setting is to toggle this behavior?- 3 replies
-
- osnap
- autocad2015
-
(and 1 more)
Tagged with:
-
;error: Unknown function definition when it is clearly in my lisp.
Lee Chu Chu posted a topic in AutoLISP, Visual LISP & DCL
Help, I keep getting this stupid error no function definition even though I have clearly defun it in my lisp. (defun ISOCP3TEXT () (command "-style" "isocp3" "isocp.shx" "3" "1" "0" "no" "no") ) (defun ISO3 () (ISOCP3TEXT) (setvar "clayer" "0") (setq pt1 (getpoint "")) (initdia) (command ".mtext" pt1) ) (defun c:meh () (ISO3) If you are wondering, I am using meh which may seem redundant but in my main source code, I actually need to call up iso3 due to a dialog box settings thing. For some reason, when I try to run meh, I keep getting ; error: no function definition: ISO3 when clearly I do have a defined function ISO3. Help please. -
Error message when trying to load up a *error* function lisp routine
Lee Chu Chu posted a topic in AutoLISP, Visual LISP & DCL
I have been getting this error in autocad 2015 but not in 2014 for some reason. Cannot invoke (command) from *error* without prior call to (*push-error-using-command*). Converting (command) calls to (command-s) is recommended. Can anybody please help me understand what this means? I have been using this code from Afralisp (defun c:drawline () ;define function (initerr) ;intit error (setvar "cmdecho" 0) ;reset variables (setvar "osmode" 32) (command "undo" "m") ;set mark (setq pt1 (getpoint "\nPick First Point: ")) ;get points (setq pt2 (getpoint pt1 "\nPick Second Point: ")) (command "LAYER" "M" "2" "") ;change layer (command "Line" pt1 pt2 "") ;draw line (setq pt3 (getpoint pt2 "\nPick Third Point: "));get 3rd point (setvar "osmode" 0) ;reset snap (command "Line" pt2 pt3 "") ;draw line (reset) ;reset variables (princ) ) (defun error() ;load function (prompt "\nGlobal Error Trap Loaded") ;inform user (princ) );defun ;;;*========================================================== (defun initerr () ;init error (setq oldlayer (getvar "clayer")) ;save settings (setq oldsnap (getvar "osmode")) (setq oldpick (getvar "pickbox")) (setq temperr *error*) ;save *error* (setq *error* trap) ;reassign *error* (princ) );defun ;;;*=========================================================== (defun trap (errmsg) ;define trap (command nil nil nil) (if (not (member errmsg '("console break" "Function Cancelled")) ) (princ (strcat "\nError: " errmsg)) ;print message ) (command "undo" "b") ;undo back (setvar "clayer" oldlayer) ;reset settings (setvar "blipmode" 1) (setvar "menuecho" 0) (setvar "highlight" 1) (setvar "osmode" oldsnap) (setvar "pickbox" oldpick) (princ "\nError Resetting Enviroment ") ;inform user (terpri) (setq *error* temperr) ;restore *error* (princ) );defun ;;;*=========================================================== (defun reset () ;define reset (setq *error* temperr) ;restore *error* (setvar "clayer" oldlayer) ;reset settings (setvar "blipmode" 1) (setvar "menuecho" 0) (setvar "highlight" 1) (setvar "osmode" oldsnap) (setvar "pickbox" oldpick) (princ) );defun You can find the code here: http://www.afralisp.net/autolisp/tutorials/error-trapping.php- 4 replies
-
- autocad2015
- autocad2014
-
(and 2 more)
Tagged with: