AutoCAD Visual LISP / AutoLISP :: Creating Stacked Fractions For Dimension Override

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


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Line Length To Dimension Override?

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

AutoCAD Visual LISP / AutoLISP :: Double Click Dimension For DIMRND Override

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

AutoCad :: Type Fractions In A Text Box As Non Stacked Fractions Rather Than Horizontally Or Diagonally Stacked

Jul 5, 2012

How do I set it so that when I type fractions in a text box it automatically keeps them as non-stacked fractions rather than horizontally or diagonally stacked?

View 2 Replies View Related

AutoCad :: Dimension Override / Diagonally Stacked Fraction

Apr 1, 2013

I need to override a dimension and I need it to be a diagonally stacked fraction (8 1/4). How do I do this?

I know there is a box in properties for text override, but it won't stack my fraction for me.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Override Existing Commands

Mar 19, 2012

Any way to override existing AutoCAD commands.

Lets try this.  When a user types "line" at the command prompt, or hits the "line" button on the toolbar, or chooses "line" from the draw pulldown menu, is there any way I can re-write what line means and draw a circle?  (Extreme example)

There are just some commands that I'd like to have a variable set in the background, depending on what the command is.  So I'm thinking if I could re-write the "line" command, instead of trying to convince everyone to use and remember a custom command, it would be much more efficient.  There are lisp files already loaded in their start-up suite.  Not sure if that works.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Continuous Dimension Lisp That Alternate Its Position

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

AutoCAD Visual LISP / AutoLISP :: Overriding A Dimension Value?

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

AutoCAD Visual LISP / AutoLISP :: Changing Text In A Dimension

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

AutoCAD Visual LISP / AutoLISP :: Draw Rectangle Dimension?

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

AutoCAD Visual LISP / AutoLISP :: Select Last Created Dimension?

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

AutoCAD Visual LISP / AutoLISP :: Dimension Styles Colors

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

AutoCAD Visual LISP / AutoLISP :: Get Coordinates For Dimension Arrowheads?

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

AutoCAD Visual LISP / AutoLISP :: How To Dimension Between Two Points In A Selection Set

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

AutoCAD Visual LISP / AutoLISP :: Set Dimension Style To Annotative Off?

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

AutoCAD Visual LISP / AutoLISP :: How To Set Dimension Break Size

May 17, 2013

I there any way to set the dimension break size in autolisp ?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Dimension Color By Layer

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

AutoCAD Visual LISP / AutoLISP :: Additional Counter For Layer Dimension

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

AutoCAD Visual LISP / AutoLISP :: Any Way To Extract All Dimension Text At End Into Excel

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

AutoCAD Visual LISP / AutoLISP :: Dimension Export Routine Modification?

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

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 View Related

AutoCAD Visual LISP / AutoLISP :: Auto Dimension Closed Polyline

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

AutoCAD Visual LISP / AutoLISP :: Dimension Building - Labeling Multiple Lines At Once

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

AutoCAD Visual LISP / AutoLISP :: Routine To Alert To Overlap Dimension Lines?

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

AutoCAD Visual LISP / AutoLISP :: Set Dimension Text Fill Color To Background

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

AutoCAD Visual LISP / AutoLISP :: Adding Numbers In Sequence Underneath Dimension Lines

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

AutoCAD Inventor :: Stacked Fractions

Apr 6, 2011

My Inventor's playing with me... When I use Leader text and type a fraction, a message box pops up asking me if I want to stack the fractions.  I don't, which has always been the default, so I just hit "Enter".  Suddenly, it's decided to go ahead and stack them, and now the box does not come up, so I can't tell it not to.  Where do I choke it to get it back to not stacking the fractions, or at least give me the option box??  R2010, S.P.0.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Creating Drawings From Excel

Dec 16, 2011

This probably isn't the correct discussion group but not sure where else to post this. 

My sales department wants to be able to create drawings based on entries in selected in their Excel qouting tool.  Basically, they want to configure a product in the field, and be able to show the customer the drawing with TrueView. (They don't have AutoCAD installed).

I would think the best I can do, is manipulate a .dxf file based on their selections but that may get very complicated.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Creating Variable Names

Nov 28, 2008

How to write some code which could create variable names like var1, var2, var3, etc. I need to do this because I have a large number to create and the actual number is variable and unknown.

Instead of manually writing a large number of line like

(setq var1 value1)
(setq var2 value2) etc

I used to be able to put 1 line in a loop to create and assign a large number of variables. I remember that it involved the use of the set (not setq) and read functions.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Creating An Export Command?

Feb 11, 2013

I am attempting to create a export command for our surveyors that deletes all there point layers and seal layer, then audits and saves the file before opening the etransmit command.

Below is what I currently have.I know there is a better way to do this, but it is above my programing skill right now.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SURVey export(defun C:SRVY () (command "-laydel" ; Delete Survey data "Name" "F0" "Name" "F1" "Name" "F2" "Name" "F3" "Name" "F4" "Name" "F5" "Name" "F6" "Name" "F7" "Name" "F8" "Name" "F9" "Name" "F10" "Name" "F11" "Name" "F99" "Name" "SHEET-SEAL" ENTER "YES" ) (command ".audit" "y") ; Audits file (command "_qsave") ; Save changes (command "-etransmit" "Choose Setup" "ACAD2010" "Create transmittal package" ) (princ))

AutoCAD Civil 3D 2012 (Primary), 2011 by contract.

Dell Percision T3500: MS Windows 7 64-bit SP1; Intel Xeon CPU W3505 @ 2.53GHz, 12.00 GB RAM, NVIDIA Quadro 600

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Creating Hatch Pattern

Nov 4, 2012

i'm newbie in customizing tools in autocad especially in creating hatch pattern. i understand that to create new hatch pattern is by adding a new hatch pattern in acad.pat file with specific angle.

my question is is it posibble to create a hatch pattern that can use specific angle follows the object shape?

This is what autocad can do by default this is what i'm trying to create

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved