AutoCAD Visual LISP / AutoLISP :: Add Calculated Text To Ordinate Dimension
Aug 8, 2013
Currently, when I do drawings, I give my machinists drawings with each point, and they program their machines. To do that, they calculate the round part diameters, which is basically 5" - 2x<Dim>.
I'd like it if I could give them drawings with the real number, and in parenthesis next to it, 5-2x<Dim>.
I've attached a jpg of what I normally give them and how I'd like it to look. Is this something do-able via a macro or something?
View 6 Replies
ADVERTISEMENT
Feb 13, 2013
I would like to create a lisp that places a block at a pre-calculated point. I've created a lisp that fetches me a block to place into my drawing. The only thing is
I have to point out the place i want it to go. I want it to got into the corner by it self. I would like to create a lisp that calculates, by the retrieved variable of the layout / paperspace, minus 10
from the bottom right corner. minus 10 from the bottom up and from the right edge to the left.
View 9 Replies
View Related
Oct 15, 2012
I want to override the measurement in a dimension with a string of text using a LISP command.
E.g.. "select dimension"
type new text for dimension
replace dimension measurement with new text. I can get the entity and its values, buy not sure which value to change for the "text override".
BTW Acad 2012.
View 3 Replies
View Related
Aug 16, 2012
I'm dimensioning an old drawing with the real (measured) dimensions and with the drawing dimensions in brackets (using ' 1500 (<>)' to give '1500 (1505)' for example.
What I'd like is to also be able to put on the difference between the length I type in and the length in brackets - as this would let me see any really glaring errors that can't be attributed to user-error on the laser measure.So I could type in '1500 (<>) (X)' where X is the formula, and get ' 1500 (1505) (5)' back?
How to be able to run a script that could highlight any dimensions where the number is brackets and the typed number have a a difference of, say, 50.Or failing that, any way to extract all the dimension text at the end into excel so I can see the differences myself?
View 1 Replies
View Related
Oct 28, 2013
I would like to set dimension text fill color to "background" instead of, you know, dimensioning my drawings properly.
I have this code I got on these forums and it works well except for the 'TextFillColor' variable. I can't find the correct color number or syntax for "Background'. It's currently set to 0 which produces ByBlock, and any number I put in there corresponds to the AutoCAD color number (1 = Red, 2 = Yellow, etc.)
If you have a better routine that you could post that works for me too. Or maybe you could just do my work for me? Even better.
(defun c:test (/ obj num cnt)
(vl-load-com)
(setq ss1 (ssget '((0 . "Dimension")))
num (sslength ss1)
cnt 0)
[Code]...
View 5 Replies
View Related
Jul 12, 2012
Is there a lisp that will allow me to do a continuous dimension, but will alternate the dimension position from low, high, low and high? If there is no lisp already created, how to create one?
See Continuous dimension attachment for example.
I work at a glass and glazing company and this is how we dimension mullion width and DLO. See typical window dimensioning attachment for window elevation with dimensions.
View 6 Replies
View Related
Jun 11, 2002
I am wondering how I can override a dimension value through AutoLISP. Is there a command line that I can use so that the pop up window won't show up?
View 7 Replies
View Related
Apr 17, 2013
how I would go about writing a function that would calculate the length of a diagonal of a rectangle using SQRT function? I've been trying but so far nothing!
View 4 Replies
View Related
Apr 10, 2012
I have the following code, that for some reason the last created dimension is no being selected. That's the first problem. The second (and not as improtant) problem( becasue it does work), is that I'm using the "dimedit" command. I prefer to do a swap within the dxf codes, that I treid but didn't work, so I resorted to the "dimedit" command.
(command "DIMLINEAR" pause pause pause)
(setq last_dim (entsel (entlast)))
(setq oldunits (getvar "lunits")) (setq oldprec (getvar "luprec"))
[Code].....
View 4 Replies
View Related
Aug 13, 2012
Is there any way to change the colors of the dimensions styles, including dimension lines, extension lines and text to "by layer"
I found a code to change the colors, but only affects the current dimensions in the drawing and the styles do not change.
View 3 Replies
View Related
Jul 14, 2012
I'm writing function which will facilitate user to offset dimension. After enter command, he select dimension and select point near one of dimension's arrowheads. Then I'm calculating new XLinePoint1 or XLinePoint2 and replacing original.
I have everything done. I thought ... The problem is when user firstly create AlignedDimension and after that he create RotatedDimension by using continous function. After that XLinePoint1 and XLinePoint2 are not parallel to the DimLinePoint (look at image).
How can I get coordinates of points selected in red rectangles?
I know that one is specified as "dimension line defining point" but what about second? How can I get its coordinates? Or maybe there is other way to get this point?
View 6 Replies
View Related
Nov 1, 2011
Looking to make a selection set of points that are on a specific layer, and then create a dimension between, in this case, two points. I feel like it should be very simple, but I can't get it to work for the life of me. Here is the test code I've been playing around with:
(defun c:test (/ sel1 TC)
(setq sel1 (ssget "X" '((8 . "VPOINTS"))))
(setq TC (polar (entget (assoc 10 (ssname sel1 0))) (dtr 180.0) 9))
(command "DIMLINEAR" (entget (assoc 10 (ssname sel1 0))) (entget (assoc 10 (ssname sel1 1))) "V" (polar TC (dtr 180.0) 9) "")
[code].......
View 1 Replies
View Related
Nov 8, 2013
I am trying to create a lisp routine, that will check the dimension style "standard" to see if its annotative. If it is, I need it to turn annotative to off.
ITO - Application Management
Factory Design Suite Ultimate 2012
AutoCAD 2012 | Inventor Professional 2012 | Vault Professional 2012
View 2 Replies
View Related
May 17, 2013
I there any way to set the dimension break size in autolisp ?
View 1 Replies
View Related
Oct 20, 2011
As a consultant we grey out architectural backgrounds for our sheets. We use the SetByLayer command to change the color of the objects in our sheets to gery out. The issue is with dimsensions. Dimension Line Color, Extension Line Color, and Text Color are all set at By Block as default and no one ever bothers to change it unless they are setting it to a specific color which is even more of a problem for us. You can edit the properties of an existing dimension and set Dim Line Color, Ext Line Color, and Text Color to by layer, I am looking for a way to automate this. Something that can search through a drawing, grab all the dimensions (even in blocks) and set everything by layer.
View 9 Replies
View Related
Sep 23, 2011
My goal is to be able to select a line and a dimension and then have the line's length appear as the text override for the dimension. I have the code to substitute the variable "dist" for the dimension text:
(setq dimselected (entsel "
Select Dimension:"))
(setq newlength dist)
(command "dimedit" "n" newlength dimselected "")
but am having problems extracting the line's length to the variable and setting setting it equal to the variable. To make things more interesting, the value needs to be in inches with fractional inches accurate to 1/16".
View 6 Replies
View Related
Aug 22, 2011
if my attach lisp can add sort of counter that how many dimensions, leader and multileaders have been move to layer "dimension"...
View 9 Replies
View Related
Dec 7, 2012
Found this routine online and am hoping to modify it to my needs, just not sure how to proceed.
It exports the text out of the dims into an excel file, the issue I have is that it automatically opens a new book every time you run the lisp with the original workbook open.
I am trying to get it to automatically insert the next set of numbers on the row below the first pull.
View 9 Replies
View Related
Mar 8, 2013
Is there a command or a lisp that will automatically dimension each side of a closed polyline at once? See attachment for image.
View 1 Replies
View Related
Sep 20, 2012
How to write an AUTOLisp program to label building dimensions. With Civil3d 2013 preventing me from labeling multiple lines at once, creating building labels to dimension complex building exteriors is much more complicated than it needs to be. Lisp Routine that Generates a MText or Dtext dimension centered on a line and offset to be clear of the line. the layer for this piece of text would always be "DIMS-BLDG" and the text style will always be "L50s."
the text doesn't have to be organized as it is in this example. the main focus is the layer being correct with the foot mark, precision set to xx.x and oriented to the line.
View 4 Replies
View Related
Sep 9, 2013
Sometimes someone dimensions a floor plan and starts one direction and then "goes back " the other way over the top of the dimension they just placed, which causes the dimension lines to overlap, which in turn shows incorrect distances when viewing on paper. Any lisp routine that can alert you to the fact that there are overlapping dimension lines (not the extension lines) in a drawing by changing them to color White or something? I have pasted a routine that we use which changes all dimenions with "modified text" to color white. That way I can see if someone just typed in the dimension distance they wanted instead of what was actually there.
(defun c:dc (/ dim_length)
(setq ssmod (ssget "X" (list (cons 0 "Dimension")(cons 1 "~"))))
(if ssmod
(progn
(setq dim_length (sslength ssmod))
(command "Change" ssmod "" "P" "C" "w" "")
[Code] ......
View 9 Replies
View Related
Feb 13, 2013
I want to doubleclick on a dimension and have the DIMRND override appear
I can't figure out what command I need to customize the doublclick CUI
View 4 Replies
View Related
Sep 30, 2011
I wrote the code below (allow the user to pick points in different viewports and then override an existing dimension's text with the difference in X values. The (hopefully) last issue is that the fractions should be vertically stacked and at 100% text size.
(defun c2text ()
(command "mspace")
(setq p1 (getpoint "Select left point "))
[Code]....
View 9 Replies
View Related
Apr 16, 2012
I have an opportunity to make a good impression at a new job, but ive never had the initiative to learn how to write a lisp routine. at my work we make walk-in coolers and freezers. these coolers are modular with a standard wall piece measuring a certain length. these wall sections have to be numbered sequentially. is there any way to automate this? sometimes we get change order from the client and it means going back and manually changing multiple texts (sometimes in the hundreds), but i thought if there was a way these wall sections could be scheduled somehow that when a new wall panel is inserted in the beginning of the sequence it would update everything after it automatically.
View 9 Replies
View Related
Jun 11, 2013
There was a message on here about using Ordinate Set to create an ordinate dimension to an apparent intersection and I've managed to do that, but is there a way to use just Ordinate to dimension to an apparent intersection? I've tried dragging and right click menu but no luck.
I'm using Inventor Professional 2012.
View 3 Replies
View Related
Jul 9, 2013
How to rotate ordinate dimension text in Inventor 2014? Currently the dimensions are horizontal but I would like them to line up with the dimension lines (top and bottom dimensions are vertical)
View 1 Replies
View Related
Jun 21, 2012
I have two attributes "REVN" and "REVD" in a block "ATT" that I would like to change (globally preferably) to the following.
(1) Existing text to keyboard entry text.
(2) Colour from existing to 10
I am a bit lost in the (command "-attdef" .......)
(defun c:atc ()
(setq rev (getstring "Please enter review"))
(setq dat (getstring "please enter date"))
(command "-attdef" .."ATT".."REVN"....."c" "10")..)
(command "-attdef" .."ATT".."REVD"....."c" "10")..)
)
View 4 Replies
View Related
Oct 8, 2013
When I click on an object to retrieve it's extended data, the data keeps writing to the right, it does not return to the next line, when the text approaches the end of the screen. Very difficult to analyze information.
View 4 Replies
View Related
Mar 2, 2013
I want to know is there any formula/calculation for the width of text object before creation/insertion? At now I used approximated width size via a simple .
(Defun GetStrWidth (str H W) (fix (*(* H W) (strlen str))));;usage: (GetStrWidth "This is a Text." 2.5 0.8);;H: TextHeight; W: width factor.
I know that for the existed text in drawing I can use textbox command, but for the texts that has not been created, what can I do? Is there any formula/calculation depends on font name, text height and width factor?
View 9 Replies
View Related
Sep 12, 2012
We are using autocad 2012.
Is there a way to move all 3.5mm text to layer text3.5 and move all 5mm text to layer text5.
View 9 Replies
View Related
Oct 25, 2012
A program that prompts:"select objects:" then I can select some objects like as text, line, circle,... after that program find all texts in selected items and swap text
swap means: xxx/yyy ===> yyy/xxx ; "/" is a divisor
swap function for one text is here:
(defun c:swap ( / pos ent el txt)
(vl-load-com)
(if(null #div#)(setq #div# "/"))
(setq #div#
(if(=(setq tmp(getstring(strcat "
Divisor character: <"#div#"> ")))"")
#div# tmp
)
[Code]....
but I want a program to prompt me like this:
(prompt "Select objects:")(terpri)
(setq a (ssget '((0 . "TEXT"))))
and gets divisor char </>:
after that:
(setq n (sslength a))
(repeat n
....
)
repeats n times, n=number of texts in my selection
View 6 Replies
View Related