AutoCad :: Lisp Routine To Select A Line And Evenly Divide It?

Jun 25, 2007

is there a command or even does any lisp routine to select a line and evenly divide it in to however sections you want?

View 9 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Routine To Place Lights In Room Evenly?

Jan 13, 2013

Lisp routine that divided up a normal square / rectangle room and insert a block at each given point.

At present if the room was to have four lights width ways and three lights length ways we would divide the width by eight to give us 1/2 1 1 1/2 so the lights would be placed on every second point after the divde command (dividing the room by twice the amound of lights needed). 

View 9 Replies View Related

AutoCad :: Lisp Routine Exist That Select Similar Microstation Blocks

Apr 17, 2012

I have a previously converted Microstation drawing in Autocad 2011. In the conversion all blocks were given unique names. I would like to edit similar blocks globally. Many of the Microstation blocks look like the standard blocks I use. Does a Lisp routine exist that can select similar Microstation blocks and give them a single name?

View 3 Replies View Related

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 2D :: LISP Routine To Radial Line Hatching

Mar 16, 2011

Easy way (or LISP routine) to do radial line hatching in AutoCAD 2006. What I mean is the ability to hatch an object, such as a ring (or doughnut) such that the hatching lines are in between the two rings, and are all perpendicular to the circle. Even better would be a generic routine to allow hatch lines to follow arcs (but that would be dreaming too big for now). Perhaps there is some sort of sweep technique that could be exploded into lines? All I need are the lines, actually.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Routine For Replacing Line With Block?

May 21, 2012

Lisp Routine that could replace a line at a specified maximum length with a block at the lines midpoint.

I would love to be able to replace all lines I select which are say less than 0.5m in length with a block at the lines.

View 7 Replies View Related

AutoCAD Civil 3D :: Offset Lisp Routine To Offset Selected Line?

Jun 7, 2013

I need an offset lisp routine to offset a selected line a set distance on each side of the selected line and change the layer of the offset lines to the current layer, and then keep prompting me to select the next line for offsetting until I'm finished.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Select Texts On A Line?

May 22, 2012

There is a very complecated drawing. Texts are on a line and crossing a line or something like that. Some texts has insertion points on the line. When the line is selected by LISP, only the specific texts with insertion points on the line are selected. Does it make sence?

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Select Line And Get Endpoint?

Feb 12, 2013

Can I select a line and get the nearest endpoint so I can do something to the line using the endpoint as a base?

It will include an ssget and an osnap "end" in the code, but not too sure how to put it together.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Select All Layers Using Command Line

Nov 23, 2011

How I can select all layers using the command line?

I am going to write a piece of lisp which will reset all the lineweights for all layers to default and have started by doing it manually on the command line to see what I need to automate.

To start with I choose -layer then LW  then type default and it is here I have a problem.  It asks enter name list of layers for lineweight default  which is where I need to choose all.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Write A Lisp Routine That Invoke The Mleader Command

Oct 11, 2012

I'm trying to write a lisp routine that, when I invoke the mleader command, osmode is set to "nearest" & orthomode is set off. I then would like the original settings to be returned.

attached is what I have written so far:-

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Using Insertion Point To Select Line Rather Than Using Entsel

Aug 12, 2013

We have been modifying a trim-around-block routine to have as few clicks as possible and though it feels like we'd be able to have the line to be broken auto-selected based off of the insertionpoint that was set as a variable.

;(setq pnt1 (getvar "lastpoint")
;      sst1 (osnap pnt1 "nea")
;end setq

;(setq ss (ssget '((0 . "LWPOLYLINE")))) ; limited to Polylines
; (while (> (sslength ss) 0) ; as long as there's anything in [or remaining in] the selection set))
; (setq ent (ssname ss 0)
; paramcount 1
; ) ; first entity in [or remaining in] the selection set paramcount 1); end setq
 
are about the closest snippets of code that we've managed to find but neither of these are working.

How we can force the program to break the line without the user having to select the line (because they will have already selected the insertpoint, and using osnap nearest would find the line that requires breaking)

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

Paint Shop Pro :: Select Certain Number Of Nodes Evenly Spaced While First And Last One Stay As Anchors

Jan 25, 2012

Sometimes, i work with the Warp Mesh, and i need to make something with a smooth curve. I often end up with several lines following the curvy line i want but i would need to have them perfectly equidistant from one another. Is there a way to select s certain number of nodes and have them evenly space while the first and the last one stay as anchors?

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Divide And Measure Between Polyline

Aug 1, 2012

do you know command or lisp that will do new pollyline between two polyline on 1/3 or 1/4 space between them.

I need sommething that would be faster,know is use measure on pollilines then i draw between horizontall polylines on verteks or point new pollyline and then divide it on 4 or 3 parts.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Divide With Blocks And Keep Attributes?

Mar 1, 2013

I need a function that will allow me to do a "divide" with blocks but I need the single attribute to remain intact.

I need the blocks to align with object and keep the attribute. I did get it to work with constants but the function that I need to run next failed because of the constant. My variable is preset and locked.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Divide Multiple Lines

Apr 25, 2013

I need to divide thousands of lines into half, but AutoCAD divide command can only allow you to select one line at a time.Is there any way we can divide multiple lines  at once.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Divide Big Region On Lines Intersections

Oct 2, 2013

I need a easy way to create a lot of small regions, or divide a big region in lines intersections, or a fast way to pick points inside objects.

Its like that:

imagine that you do 100 horizontal lines and then 100 vertical lines.  Now you have 10.000 squares. i need a fast way to make a region in each one of then.

So its too much trouble to pick points inside each one of then. i need to divide a big region or a fast way to create Plines or objects with the little squares. And i cant use array because they aren t regular squares.

Its something that i do often, its not a one time thing. This is necessary in structure analysis modeling, i export this dwg to a dxf file, that i use on a finite element program.

i never did a lisp before.

View 9 Replies View Related

AutoCAD 2010 :: Lisp Routine And Keep Getting NIL

Dec 4, 2012

I have a lisp routine and I keep getting NIL. I want it to draw a door and I want to be able to move it.

(defun c:door ()
(DEFUN dtr (A)
(* PI (/ A 180.0)))
(setvar "CMDECHO" 0)
(DEFUN INFO ()
(setvar "OSMODE" 0)
[code]....

View 1 Replies View Related

AutoCAD 2010 :: Divide A Line Into Variable Running Parts?

Jun 28, 2012

can I divide a line into variable-running parts is there a command?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Divide Spaces With Max Gap - Draw Lines Between 2 Points

Feb 6, 2012

I have to put some trusts between two beam. It sounds easy but i'm unable to handle the divide and round off commands in the lisp. See attachement also.

To draw my trust between the 2 beams, what I normally do, is that I manually take the distance between the two points say it's 10 000 and wrote it down. Then I divide it by my max gap, say 1200, it is the max space between trust.

10 000/1200 = 8.333333 that's the result of how much trust and space between them that i'll need, 8 trusts, 9 spaces between the 2 beams. (That is what I'm unable to do in the lisp, tell it to round off 8.333 to 9 and use 9 for divide command)

What I manually do at this point to draw these trust is that I must create a temporarly line between the 2 beams, perpendicularly to these and divide it by 9.

It gives me 8 cross (or point) to draw my trusts. All this is long to do manually because I have many bay in building and I have to redo this operation for every the bay.

So, what I would like the lisp to ask is:

Specify distance between two beams (Between where and where) :

Specify the lenght of the trust :

Specify max gap: I would like to answer a number here, say like 1200 max

(The lisp should draw the lines on the current layer, color and linetype of the current layer and not draw a line at the beginning and at the end because that's where my Beams are. I hoped you understand, see attachement.

Should also have something that handle a ESCAPE hit or cancel, something like this:
 
(defun trap1 (errmsg) (command "_.undo" "_end") ; undo end (setvar "osmode" oldsnap) ; restore variables (setvar "cmdecho" 1) ; enable cmdecho (setq *error* temperr) ; restore old error handler (prompt "

[Code] ....

View 4 Replies View Related

AutoCAD 2010 :: Way To Put Mleader Into LISP Routine

Aug 16, 2012

I put mleader into a LISP routine and it is doing the text attached to it only in the command line instead of in the drawing is ther a way to put mleader into a LISP routine and have it do the same as when you just type in mleader?

View 2 Replies View Related

AutoCAD Map 3D :: Lisp Routine Not Working In Version 11?

Jul 25, 2012

We are moving from AutoCAD Map 3d ver 10 to ver 11.  There's a lisp routine I use all the time and it doesn't seem to want to work in the newer version 11. this routine is supposed to fill but like I said doesn't work in ver. 11.

View 1 Replies View Related

AutoCad 3D :: Lisp Routine To Flip All Faces?

Nov 24, 2011

We have just finished modelling hundreds of pits/manholes in 3d, to import into 12d as required by our current project.

After importing into 12d we have realised that all the faces are back to front as the dark edges are facing outwards, and the light edges are facing inwards on the pits.

Is there a way to globally flip, or perhaps a lisp routine to flip all the faces?

View 0 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Stuck In A Routine 2?

Nov 21, 2013

Basically, the routine asks for the user to choose the hatch type (Retirer/Percer), then the layer (Defpoints/Select/Current) and finaly the type of the object to draw (Polyline/Rectangle). My original routine has also a Circle and a Boundary options, and an Error trap to reset the variables but I will keep it simple for the purpose of my issue. 

So, my issue is: when I choose the type of object to draw, it draws just one of it and the routine ends. I would like to have something that "says" to the routine that I want to keep drawing that object (Polyline or Rectangle) and putting the hacth inside until I do enter and then the routine goes to its end.

View 9 Replies View Related

AutoCad :: Lisp Routine For Creating Item Balls?

Aug 29, 2012

Lisp routine for creating item balls with an arrowhead and a one to two digit number in the balloon?

View 7 Replies View Related

AutoCAD 2010 :: Lisp Routine Fails In 2012?

Jan 24, 2012

I am using a fairly old Lisp to generate section arrows, started using this in 2000 and up until 2011. Since we have installed 2012 the routine does not work correctly, after inserting block with attributes instead of bringing up dialogue box it inserts next line of string in to the dialogue box. I have attached lisp routine and blocks

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Force A Routine To Be Run

Dec 10, 2012

I have created an acad.lsp file in where I want to arrange all our company settings. I've stored it on the network to make sure everyone will use the same one and when updates take place I don't have to run past all pc's to change it. I've set everything in the deployment package but users can still change it when they reset their profile. Plus some pc's are already installed with AutoCAD before creating the lisp routine, how can I enforce the support directory to check on the network for the acad.lsp each time?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Use Selection Set For Routine?

Oct 16, 2013

with the mouse I can select objects on the screen and then start a command that uses these objects.

How can I perform this in lisp?

I can create my selection set, that's no problem, but how can I 'make it active'  for an external function?

(ssget "_C" p0 p1 '((0 . "TEXT")))
???
(c:txtexp)

View 2 Replies View Related

AutoCad 2D :: Lisp Routine For Making Points Selectable

Aug 22, 2013

I have got points from a GIS software into AutoCAD, the problem is that I am unable to draw a polyline between the points to get a distance between the points. Anu lisp routine which can convert the points to make them selectable. I have attached the drawing I am working on for those of you who want to have a go at this one.

View 3 Replies View Related

AutoCAD Civil 3D :: Divide Ellipse Into Line Segments Of Required Mid-ordinate Distance

Feb 20, 2013

How to divide ellipse into line segments(equal/unequal lengths) of required accuracy or tolerance  ?

tolerance = mid-ordinate distance

Civil 3D 2012, SAC
16 GB Ram 64 Bit Win7

View 2 Replies View Related







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