AutoCAD Visual LISP / AutoLISP :: Find Maximum Distance Between 3D Poly And Spline?

Aug 8, 2013

Let's say I have a 3D polyline, which I turn into a spline. I then want to determine how closely the original polyline and spline follow each other. How I can check this programmatically? The concern is to find the maximum deviation and its location.

Howto be able to run the check on other types of objects as well: arc, polylines etc.

View 6 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Divide 3D Poly Line

Sep 21, 2011

I have little Autolisp experience, what I need is a lisp routine that will divide a 3D Poly line to say about 1000 points and add index to the points from the start of the line to the end of the line. It is very important that the index be from the start to the end of the line, because we extract the info to excel and then use the x,y and z co-ordinate of the points on our hydraulic analysis  program. We need to have the index and the x, y and z co-ordinates on our Excel sheet sorted by index and not by x, y and z.

To be more clear the 3D poly is a pipeline profile so we need to have the points in order by index and not by x, y and z.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Convert A Poly Face Mesh To A Solid?

Oct 10, 2011

Looking for a lisp to convert a poly face mesh to a solid.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Convert Spline To Curved Leader?

Sep 21, 2004

Code to convert a spline or read its points so I can create a curved leader (with arrowhead) reasonably close ?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Defining Points For Spline Command

Apr 4, 2012

I am working on a little lisp routine to draw splines, but can't get it working. The basic idea is that i first select a set of points that i can feed to my spline command.
 
(defun c:test2 () (setq pt (getpoint "
define point:")) (setq ptlist nil) (while (not (equal pt nil)) (setq ptlist (cons pt ptlist)) (setq pt (getpoint "
define point:")) ) )

Now i need to draw a spline based on these points. My plan whas to simply use the acad command itself. But this option didn't work.
 
(command "spline" ptlist "")

Then i tried using the vla-addspline command. But i can't even get this one working .

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Polygon From Distance Between Point

Sep 18, 2013

I need a lisp that creates a polygon of N points, so to enter a only the distance between these points, after choosing N points in the drawing for approximately creating polygons.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Convert Ellipse Segment Into Spline Or Polyline

May 3, 2012

Our customer send us drawing with ellipse segments  into.

With Autocad 2008 I bought a plug-in call SplineConvert that did the job perfectly but not compatible with 2013.

Is there any plugin that could replace that tool  ?

Is there any standard ACAD command that could easily do this Job ?

I need a way to make 2 or 3 times per week  this converting on all ellipses of large and detail 2D drawings so no time to offset in and out all those .

I try also DXFOUT in R12 but all the spline are being converted into 3d  polyline making a huge files that froze my PC.

I also try FLATTEN but did not see how it work , the ellipse stay an ellipse.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Distance Between Two Points Along The Path Of Polyline

Sep 10, 2012

There are times that I have a really long curb polyline that has both line and arc segments.  I wish to pick two points along that polyline and have it give me the distance between those two points along the path of the polyline.

Do we have this ability natively?  Have I been missing something all this time?  Normally I have to make a copy of the original entity, ... break, break, list erase or undo....

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Getstring Input Integer Or Distance?

Feb 21, 2013

I would like to eliminate a mouse click in my program. I use getstring to allow the user to either enter in an integer or a distance used for labeling in a drawing, but I could eliminate the need for the user to then click an option that completes the label if I only knew how to determine if the entry is an integer (such as 5 or 15) or a distance (such as 24" or 36").

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Maintain View Distance When Changing Viewpoint?

Dec 30, 2011

I am using the following routine definition then calling the different view poins from a pop up menu.

Each time I switch veiw points it drastically zooms out. I would like to maintain the "zoom distance" if there is such a thing when switching views. 

Ideally, like when in 3dorbit, I would like it to swing views around similar to that but to the defined viewpoints as below....

(DEFUN V (inp) (setq inp (strcase inp))

   (cond     ((= inp "T")       (SETQ IXY 270)       (SETQ FXY 90))     ((= INP "F")       (SETQ IXY 270)       (SETQ FXY 0))     ((= INP "RE")       (SETQ IXY 90)       (SETQ FXY 0))     ((= INP "L")       (SETQ IXY 180)       (SETQ FXY 0))     ((= INP "RI")       (SETQ IXY 0)       (SETQ FXY 0))     ((= INP "URI")       (SETQ IXY 0)       (SETQ FXY 45))     ((= INP "UL")       (SETQ IXY 180)       (SETQ FXY 45))     ((= INP "UF")       (SETQ IXY 270)       (SETQ FXY 45))     ((= INP "URE")       (SETQ IXY 90)       (SETQ FXY 45))     ((= INP "URF")       (SETQ IXY 315)       (SETQ FXY 35))     ((= INP "URR")       (SETQ IXY 45)       (SETQ FXY 35))     ((= INP "ULF")       (SETQ IXY 225)       (SETQ FXY 35))     ((= INP "ULR")       (SETQ IXY 135)       (SETQ FXY 35))   );COND  (COMMAND "VPOINT" "R" IXY FXY) );END V.LSP

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Program To Evenly Space Objects Across Given Distance

Dec 28, 2013

I would like to write some sort of AutoLISP program to evenly space objects across a given distance.  I have attached a .pdf file showing what exactly I mean.

I would like the program to enable me to either enter or measure (via the selection of two points) the "z" distance, to enter or measure the "y" distance, and to enter the number of objects, "n".  I would then like the program to evenly space "n" objects across the "z" distance.

A program like this is, I have to be honest and say, way beyond my current capabilities.

Perhaps some initial guidance to get me going? 

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Create New Double Line From Centerline According To Specific Distance

Jan 9, 2014

I have double line pipe drawings but i have to change distances between of this lines in entire drawing and i was thinking that maybe there is a lisp code which can create new double line according to my specify dimensions ...

example :

    Distance between lines : 100 mm

    ------------------------

    ------------------------

here is what i want to do :

1. select double line

2. specify new distance ( for example 200 mm)

3. lisp will create center line middle of the selected lines ( maybe it can ask me that this center line will be permanently or not )

4. lisp will create new double line from this centerline according to my specific distance

5. new double line layers will be the same with selected old double line

and this lisp has to work for double arc or quarter circles too.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Find Snap Errors

Jun 9, 2004

how to check snap errors in drawing in a specified layer against some other layer. means first layer should end with second layer otherwise place error.both layers have linear features.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Find And Mark Blocks

Dec 24, 2013

My drawing constitutes of many blocks and other objects , and i need to find specific blocks (with same block name) in my drawing which i cannot find them one by one and i though that i can find them all with lisp routine ..

so , i wanna specify point out of my drawing area and lisp routine will draw to line from basepoint of those blocks to specify point when i select one reference block.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Find Overlapping Text?

May 24, 2007

What would be the ideal way to find out the overlapping text.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Find Cellname In Excel

Jun 25, 2012

I would like to get the cell with a specific name in Excel.

In Excel you can give a cell a custom name like "Project_Name".

How do I get the sheet and cell(row,column) of the cell with this custom name ?

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Find Object Associated To A Field

Nov 1, 2011

We use multi-leader objects in our drawings. When the multi-leader and its value are to be replicated throughout the drawing, we create mleaders with fields that show the contents of the first mleader. That way we can update only the value in the first mleader and all of its children will update as well. It works nicely for us.

Here comes one snag. If one of us opens a drawing with which we are not intimately familiar, we don't know which mleader is the parent of which children. There might be fifty parents and four hundred children in a drawing so going through them by hand is a big productivity drain.

What I need to do is write a routine that will let the user select the mleader that includes the field and have the routine highlight and/or zoom to the parent object.

I thought I should be able to find that info in the dxf codes for the mleader, but I am either missing it or it's not there.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: 3D Polyline To Polyline To Spline With Max

Sep 21, 2013

Due to modeling purposes, I need to convert a 3D polyline to a spline. What I have been doing is:

- change polyline fit/smooth to cubic from properties
- convert polyline to spline by typing spline -> object
- method -> fit from properties

You can see the original 3D polyline (green) and the resulting spline (magenta) in the attached drawing.When I zoom in and measure the distance between the two entities at different points along them, at some points the perpendicular distance exceeds 5 millimeters, and I want to ensure the deviation remains under 1 millimeter or even less.

I know I can change the knot parameterization of the spline, and this does work at some locations, but the difference increases at others.Why is there a 5.6 mm difference between the spline fit point and 3D polyline vertex, as measure in the attached drawing?

Now, I can go and manually stretch the fit point to coincide with the vertex. Also, I can add fit points between existing ones to drag the spline closer to the original 3D poly.

However, some of my polys are really long, and it is very time-consuming to do this manually while measuring points along the entities to make sure the distance stays small enough.

how to automate this process? For example a lisp that would maybe take the original vertex points, add say maybe 3 (not too many) new ones between them, and then generate a spline while making sure the deviation is less than the set value of 1mm? I am using AutoCAD 2013.

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Find DXFIN Command Code?

Sep 22, 2011

Where I can find the DXFIN command code? I want to examine it to see how it does what it does.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Find Offset Origin Of Layout

May 8, 2013

I want to know the correct way to find the offset origin of a layout in an AutoCAD drawing.  Let say I have a drawing that has many items on it.  And I create a layout showing just the items in the lower right corner of the drawing.  I want to know the offset origin of this layout relative to the Model space.

I came across some LISP commands that are supposed to do just that:
 
(vl-load-com)(setq activelayout (vlax-get (vla-Get-ActiveDocument (vlax-Get-Acad-Object)) 'ActiveLayout ))(setq activeplotorig (vlax-get activelayout 'PlotOrigin)) 

Unfortunately, the commands don't seem to work because it always returns (0.0 0.0).  That cannot be right.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Find A Block And Get Its Insertion Point?

Jan 27, 2012

How can I find a block with a specific name and get what the coordinates are? What we have is our Bill of Material is attributed blocks. I am attempting to change the first one. Well all of the lines that list the parts are seperate blocks with the same name. Now the Top Line of the Bill of Material is a different named block. If I can find the coordinates of this block I can then select the first line to do what I need to.

If needed: AutoCAD 2013 User using Visual LISP for editing LISP and DCL files Also I have AutoCAD 2011 currently still available for us, but we are using AutoCAD 2013 for 99.9% of AutoCAD use

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Find Text And Get The Filename Where It Occurs

Jun 24, 2012

Actually I am not a Autocad Lisp person but I need to refer Autocad drawing for my workflow.

Is there a way in Lisp to find a certain, text or attribute in all files in a folder and if the file

contains that text to get the filename written to a txt file.

Config :: Intel (R) Xeon (R) CPU E31245 @ 3.30 GHz, 16.0 GB, 64bit win7
Inventor 2013 and Vault Basic 2013

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Find Duplicate Text String

Jun 11, 2007

In order to avoid duplicate text string in different places in the same drawing, I would like to have such a tool to find duplicate text string.

For instance, I want to put numbering of some connection lines, I do not want to have different lines but have same number by mistype.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Find And Replace Multileader Text

Jan 25, 2012

I'm looking for a lisp routine that can find and replace multileader text.

I want to replace "T." with "T+" and "B." with "B+".

All the multileaders are on layers with a suffix of "-elev".

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Find Start And End Point Of AEC WALL

Jan 29, 2003

Using Lisp or VLisp, how can I find the Start & End Point of an AEC_WALL ent. ?

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Find One Of Corners Of Viewport Outline

Feb 2, 2012

Further to my earlier topic for getting the viewport scale which has been nicely solved, I am looking for a way to get one of the corners of the viewport outline 'drawn' in modelspace so that I can add the name of the spcific layout Tab to which it relates in a location that suits the drawn outline.

The code that I am adapting came from the thread titled Outline projection all viewports to model..The routine appears to pick up the corners of the viewport in paperspace and tranform/translate them to modelspace co-ordinates.

  (defun _trans (p) (cons 10 (PCS2WCS p ent))) (defun _cornersFromBBox (o / a b) (vla-getboundingbox o 'a 'b) (setq a (_trans (vlax-safearray->list a)) b (_trans (vlax-safearray->list b)) ) (list a (list (car a) (cadr a) (caddr b)) b (list (car b) (cadr b) (caddr a))) ) (if (setq ss (ssget '((0 . "VIEWPORT"))))
[code]....

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Have Routine To Find Polylines That Are Overlapping

Feb 26, 2010

I work with polylines a lot to maintain Facility Space and I come across polylines that are overlapping. Is it possible to have a routine to find polylines that are overlapping? Sometimes I really have to zoom in pretty close to see if they are overlapping and sometimes it's pretty obvious.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Find Plotting Parameters With Vlax

Nov 18, 2013

the names of the function to establish the plotting parameters using the (vlax-get-property <name> <parameter> ) method.  For example the plotting device name is obtainable by (vlax-get-property <objectname> 'Configname).  

What "words"/parameters do I use to find the plot orientation and paper size?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Find Position XYZ And Rotation XYZ Of Each Entity?

Jul 13, 2011

finding each objects Position XYZ and Rotation XYZ using LISP.  It looks like position is a pretty easy one but rotation data is a bit elusive.  

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: No Function Definition With Distance Function

Oct 25, 2013

This seems absolutly silly.

(setq p1 (getpoint))
(setq p2 (getpoint))

(setq Dist (distance p1 p2))

Why does this not work?

I'm trying to build a command to replace AutoCAD's "DI" command, to give distance and delta x, y, and z values in decimal and imperial, and keep the angles in XY plane and out of XY plane.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Find Duplicate Text / Highlight With Any Color

Nov 27, 2013

find duplicate Text & highlight with any color (numbers or text string) ? I have a drawing and have to find duplicate text string, file is bigger and need make this automatic find, & highlight the duplicate text.

View 4 Replies View Related







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