AutoCAD Visual LISP / AutoLISP :: Set All Lines And Plines Scale To 1

Jul 15, 2013

I am working on a script.  I need to select all lines and polylines and set there linetype scale to 1. 

I'd take a simple lisp routine if that would be easier.

View 9 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Select Lines / Plines That Intersect Given Pline

Sep 13, 2012

I need to change the color of all lines/plines that intersect a given pline. How would I go about making the selection set of all lines that intersect that given pline.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Create Some Plines In A Drawing

Sep 10, 2013

I have to create some plines in a drawing from the inputs provided by the client. I prepared a lisp code for it. I have to use it to 1000 drawings. Every time I open the drawing and running the lisp command.

Is any lisp code to run in bulk open drawings with out entering command prompt.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Adding / Removing Vertex To Several Plines At Once

Feb 27, 2012

I'm looking for something that, after selecting several plines (overlaped or not), I can insert/remove vertexes.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Select Several Plines And Export Their Vertexes

Jun 29, 2012

Yesterday I post the message "Exporting pline and text" which turned out to work realy well.

However I need something else...

I need to select several plines and export their vertexes (as it is already done) BUT I also need to select SEVERAL texts and export them as well as their insertion point coordinates.

I tried with the code below but without any success... It gives the error "; error: ActiveX Server returned the error: unknown name: "TEXT"" This happens after selecting some texts and hiting enter.

Here is the

(defun c:zi5 ( / f i o s ss obj objdata texto texto_f nomebase nome_zi tx1 iPt)(vl-load-com)(setq nomebase (getstring "
Enter name for file:"))
(setq nome_zi (strcat "D:" nomebase "_zi.txt"))
(princ "Select your plines...")
(if (and (setq s (ssget '((0 . "LWPOLYLINE")))) (setq f (open nome_zi "w")) )

[Code]...

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Label Contour (2D Plines) From Elevation

Nov 21, 2013

Of course with ACAD MAP (FDO Labels for example) or better with ACAD CIVIL : no problem !

But often I have to use a Standard AutoCAD ...

A lots of people have already asked for this routine :

But I search in this forums and some others and unfortunately I can't find any correct routine Full operational on ACAD 201X 32/64 bits

I have many 2D Plines with an Elevation : some Normal , some have been splined --> 1st problem

I would like to label them with :

- either a Block with ONE attribut : the elevation

- either a MText with a blank Mask behind

As you wish ...

Question : Size/Height of the Block or MText ?

Some 2D Plines are very long (2nd problem) so I would like a question like :

Label each Pline every xxxx Units ?

So on a Pline Contour of 2000 meters, I could have the elevation (Block or MText) every 50 meters ...

Of course I would like that the Block or Mtext will have to follow (rotation) the Pline (splined or not) where the label is inserted !

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Set Plot Scale By Annotation Scale?

Aug 9, 2012

I am working on automating page setups in model space and am looking for a way to set the plot scale equal to the annotation scale for scaled drawings with

(setvar "filedia" 0)

(setq a (getstring (getvar "cannoscale")))

(command "-plot" "YES" "MODEL" "" "" "" "" "" "" !A "" "" "" "" "" "" "_Y" "_N")

Setting the plot scale with !A causes the lisp to fail.  However, when running each prompt through the command line individually, !A works fine.  what is missing?

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Quicker Alternative Changing Annotative Scale In Object Scale List

Apr 10, 2013

I would like to find a lisp that changes the scale of something that has an annotative scale and deletes all other scales in the object scale list.  Often i have many different scales of existing dimensions or objects. i waste a lot of time opening the annotation object scale dialogue box, selecting add, finding my scale and deleting the old scale. 

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Intersect Between Two Lines Using Start And End Values Of Two Lines

Oct 11, 2013

With all of you fine teachers, I have the know-how to get the start and end values of a line.

Do you think there is a way to get a point returned that represents the true intersection of the two lines, without having to involke a user defined "getpoint" function using "intersect" osnap?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Construct Lines Between Lines Ending Points Multi Selection?

Aug 3, 2013

I want to construct lines between every two line ending point by multi selectio window instead of drawing it manually between lines ending point ?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Get Viewport Scale

Feb 2, 2012

I am adapting a routine by Alan J Thompson found here for placing an outline of a paperspace viewport in modelspace.

I have added some lines for making a suitable No plot layer with appropriate linetype, and wanted to make the lwpolyline have a thickness dependent upon the viewport scale.

My paperspace viewport scales are set for printing via Zoom - 1/50XP for example to get a 1:50 scale plot (or 0.02XP)

Having selected the relevant viewport, I wanted to be able to determine the vp scale, but am unsure how to extract this information from the viewport entity itself.

The routine was as follows:-

(defun xpfact ()
(- (car (trans '(1 0 0) 2 3))
(car (trans '(0 0 0) 2 3))
)
)
--

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Annotation Scale To 1:2

Apr 26, 2013

take a look at the test.dwg it contains a block named 'box' (which is a rectangle) and some attributes. the annotation scale is 1:1 and i zoomed in to focus on one attribute.

change the annotation scale to 1:2 and you will see the attribute grows by 2 - that's ok! now load attmod.lsp and run attmod command and you will see the attribute grows again by 2

even the command only (entmod) the attributes without making any change.(to restore it use battman sync)Is there a workaround to this bug?

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Scale Multiple 3D Polylines

Feb 7, 2013

Is there a way or a lisp to scale multiple 3d polylines, at same time, and the base point is the start point of each one?

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Multileader Scale Variable

Oct 10, 2008

A2008. Is there a setvar, setenv, registry entry etc. that can be used to change the scale of Multileaders with annotative off to have the same effect that DIMSCALE has on Q leaders? I want to have a single scale-independent Multileader style and modify it on the fly along with DIMSCALE and LTSCALE. I'd use Qleader but UCS's do odd things to text position and orientation.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Annotative Drawing Scale

Apr 26, 2012

I am attempting to create an AutoLISP that removes all un-used drawing scales from a file, then adds the standard scales used in civil engineering. This is what I tried using:

;;;Add Engineering Scales
(defun C:AES ()
 (command ".CANNOSCALE"
   "1" = 1'"
 (command "-scalelistedit"
[code]...

Now, I am only a beginner to writing LISP, but I know that my problem is that it is reading the inch marks after the one in the scale name as a enter, but I don't know how to get around this. Also, I don't know how to get it to skip scales that are still in the drawing.

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Make Block Uniform Scale?

Oct 8, 2009

Is there any way to make a block uniform scale using lisp? and also make a block drawing uniform scale?

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Routine To Scale Text Objects

Jan 8, 2014

Any Lisp Routine to scale text objects a certain value and have the program actually scale each text object as you pick them.

The change text height using the Properties function does not work for what I need because the objects I need to scale are Mtext objects with Background Mask, and when you use the Properties function to change their text height it messes up the background mask so that you have to select each text entity and stretch the mask area smaller or larger, but if you use the scale function it scales the background mask as well so the background mask coverage is still the same.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Scale Changes Upon Inserting Block In The Drawing

Jul 17, 2013

I had been trying to insert a title block (block) in to a drawing as part of changing the title block But in some drawings the block gets scaled off. Is there any system variable or any solution to maintain the drawing without getting scaled while inserting block.

I had used -dwg units and this appears to single drawings only. Any other way to do this to all the files in a folder.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Setting A Custom Scale On Viewports

Aug 29, 2012

I have a problem that I cannot seem to solve.  I have a drawings with a whole bunch of layout tabs that have a few viewports in each tab. One of these viewports on each layout tab is on the layer VIEWPORT. I did this so it would be easy to filter out the other viewports in the drawings. I am using the code below to change all of the viewports with the layer VIEWPORT to the Custom Scale 0.020833. This works for all of the layout tabs except the first tab. It will not for some odd reason work on the fist tab. 

(setq vieportfilter (list (cons 0 "VIEWPORT")))
(setq ssetvp (ssget "x" vieportfilter))
(setq cntrp 0)
(while (< cntrp (sslength ssetvp))
[code]..........               

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Rotate Block Current Annotative Scale ONLY

Dec 6, 2011

I have the below code (from a user here on the forum) which works great for aligning text, mtext and blocks to 2 points.  For annotative entities, it respects the rotation angle for mtext and text. 

ie I have an mtext object at 1"=20' scale and at 1"=40' scale.  I run the command when the current annotative scale is 1"=40'.  The object at 40' scale has changed, but the 20' scale is unchanged.  This is working as I would like it to.

But for annotative blocks, it gets weirded out.  In the above example, the block at 40' will rotate, but so will the attributes at 20' scale.  But linework and hatching at 20' scale will be unchanged.  it looks really weird. how to get it to play nice with blocks.  Ideally, I'd like the block to be at different rotation angles in different annotative scales.

(defun C:R2P (/ ss ang edata); = Rotate objects to align with 2 Points (setq ss (ssget '((0 . "*TEXT,INSERT"))) ang (angle (getpoint "
First alignment point: ") (getpoint "
Second alignment point: ")) ) (repeat (sslength ss) (setq edata (entget (ssname ss 0))) (entmod (subst (cons 50 ang) (assoc 50 edata) edata)) (ssdel (ssname ss 0) ss) ))

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: CANNOSCALE Value Needs To Match Existing Named Scale

Jan 18, 2012

The crux of the matter is that the CANNOSCALE value needs to match an existing named scale.  This lisp is part of a bigger lisp and I need to pass a variable into it.  Here's what I have:

(setvar "CANNOSCALE" (strcat "1" = " (rtos variable 2 0) "'"))

But I get this error when I try to run it.

; error: bad argument type: numberp: nil

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Setting Option For 1"-30' Viewport Scale

Oct 18, 2013

calculation a viewport scale of 1"=30'.

I've looked around and only find nearly what I looking for. For 1"=20' I have a value of 0.004167 Paper Units = 1 Drawing Units, but what is the formula to calculate 1/30"=1'-0"?

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Create Polygon Viewport At Specific Scale

Apr 25, 2013

I'd like to run one command that allows the user to draw a polygon viewport then sets that VP to 1/8"=1'-0".

It can be nearly accomplished with a macro, but falls just short because the polygon vp requires an unknown number of clicks, so there is no way to know how many pauses for user input in the macro.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Copy / Move / Scale / Rotate Objects

May 24, 2002

Any lisp routine where you can select objects and do a global rotate, scale, etc. from each object's insertion point ?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Line Between Two Lines?

Feb 15, 2013

I am trying to draw a line between two lines and I put together the following. It works great if the start/end points are perpendicular to each other. How do I solve if line one start point is in a positive direction and line two is in a negative direction? 

(defun c:test ()
 (setq L1 (car (entsel "
Select the first line: "))
L2 (car (entsel "
Select the second line: "))
 )

[code]....

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Available For Angle Between Two Lines?

Nov 28, 2011

i know DIMANGULAR command will let me draw a dimension to display the angle between two lines, but is there a way for my commandbar to show me what the angle is rather than draw a dimension?

I often want to simply know the angle but not display it in the drawing, and it'd be good if there was a command/lisp which showed me in the command line area, or perhaps a pop up window, similar to what the TLEN lisp does here: URL....

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Get Min Max Coordinates Of A Set Of Lines

Dec 5, 2013

I want to get the minimum and maximum x, y coordinate values of selected lines. In other words, i want to find the top, bottom, left and right edges of a set of lines.

Is it possible to achieve this with a lisp code?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Multiple Mirroring Lines

Aug 27, 2013

Project involves repeatedly mirroring a line by selecting mutiple lines to do the mirroring. Probably sounds confusing.

The progress so far can be found here: [URL] ........

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Labeling Lines With Lengths

Mar 2, 2012

Labeling lines with their lengths,

I got the attached lisp file from the web which automatically labels the lines with their length. Resulting the values of the length in the absolute values of the length instead of saying that the length is in inch. i.e, i  need to remove the inch sign (") from the suffix of the length.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Go From TEXT And LINES To TABLE?

May 6, 2009

The PARTS LISTS on our old drawings are simply text entities and lines. Some are MTEXT. But our new drawing template has us creating our parts list using the actual AutoCAD TABLES entity.

I'm looking for the best method to go from lines and text in AutoCAD, to an AutoCAD table. As of now, I have to retype everything since I can't select a column/row or group of text entities, copy/paste into a table.

Any LISP function that will allow me to go from TEXT and LINES to a TABLE? I've tried B2E (lisp name) but it's not working - found that on a lisp site somewhere.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Line In The Middle Of Four Lines

Aug 10, 2013

I need lisp that do a line between 4 lines. 

View 7 Replies View Related







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