AutoCAD Visual LISP / AutoLISP :: Two Lines In Drawing - How To Flatten

Jun 19, 2013

There are two lines in attached drawing. It seems FLATTEN doesn't work on them. How can I flatten them with lisp code?

View 9 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: How To Use It For Drawing Lines Between Two Points

Aug 19, 2013

how to use AutoLISP to draw lines between two points. I have x,y,z coordinates for the end points in an excel sheet which I can save as a text file. I need to pull the coordinates from the file and use them to draw the lines. There are 2000+ lines so it is not feasible to draw them manually.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Drawing Rectangle Between Lines

Aug 9, 2013

I need lisp that draws rectangle between two lines by window selection. As attached.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Drawing Two Different Lines Over Each Other In One Step

Dec 5, 2011

I want to draw a line which shows a particular color scheme, I at current do this by drawing a solid line of one color and then use a dashed line of another color top go over it.

The obvious problem is that these lines are being double drawn. Is there a way using lisp that I can draw both lines at once?

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Put Multi-lines Of Text Into Drawing Info Comments

Dec 19, 2011

I am able to insert multi line text into the Drawing Properties Summaryinfo standard field "comments" by using  string concatenation in VBA by using "mytext" & vbLF & vbCR "mytext".

But I can't find a way that works in autolisp. This code does not work.
 
(defun c:FillComments (/) (vl-load-com) (setq acadObj (vlax-get-acad-object)) (setq acDoc (vlax-get-property acadObj 'ActiveDocument)) (setq acDocSumInfo (vlax-get-property acDoc 'SummaryInfo)) (setq *customer* "MyCustomerName") (setq *location* "MyLocation") (setq *project* "MyProject") (setq*comments* (strcat *customer* ", " (chr 10) (chr 13) *location* ", " (chr 10) (chr 13) *project* ) ;_ end of strcat ) ;_ end of setq (vlax-put-property acDocSumInfo "Comments" *comments*) (princ)) ;_ end of defun
 
The text comes in but all on one line.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Flatten 3d Object To 2d

Mar 15, 2013

I am trying to write a simple (or at least I thought it was) code to flatten a 3d object into a 2d shape.  For some reason after ACAD runs the lisp it recognizes the flatten command but it will not select all.  this is what I have:

(defun c:fl () (command "flatten" "all") ) 

I have even tried the pick first command, to select all then run the flatten command but that still doesn't work. 

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Flatten Inside Blocks

Apr 17, 2012

I wanted to flatten arcs, circles and lines inside a block using the following lisp (which I found in this forum). I found that sometimes this lisp is unable to flatten the ARCs inside the blocks. I do not understand why it is not working for all the blocks. I have attached a drawing in which this lisp is not working.

(defun c:FlattenRaj ( / blocks stpt enpt inspt )
(vl-load-com)
(setq blocks
(vla-get-blocks
(vla-get-activedocument
[code].......

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Get Outline / Contour Of End Of Pipe To Stretch Flatten 2D Model

Aug 17, 2011

how i have to make something. In the attached file i've made a pipe/tube under a angle (see attachment). What i would like to have is that I get the outline/contour of the end of the pipe to a stretch flatten 2D model (see pdf attachment). Is this already a standard autocad command or lisp for this?

View 9 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 :: Saveas Drawing With Default Drawing Name

Oct 13, 2013

I am trying to put together a lisp routine for exporting a Civil3D drawing to basic autocad entities and convert it to a clients layer standards.

I don't want any user input, so I see two problems with the routine at the moment.

Step 2. SAVEAS - I want the drawing to be saved in the same directory as the current drawing, either called "CLIENT_export.dwg" or preferably "Export_{current drawing name}.dwg". If the dwg exists I want it either to overwrite or increment a suffix number.

Step 4. At the moment it askes the user for a selection, I want it to select "ALL"

;;;Purpose to convert a Civil3D drawing into CLIENT layer standards.

(defun c:client ()
(setq old-echo (getvar "CMDECHO"))
(setvar "cmdecho" 1)

[Code]...

I don't have any experience with LISP or any other programming. I have just been cobbling this together from bits and pieces I have found on the web.

View 3 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 :: Insert Another Drawing Layout Tabs Contents In Current Drawing

Mar 7, 2013

I want to insert another drawing layout tabs contents in current drawing.

It's easy for MODEL tab, but for LAYOUT tabs, I dont know how!?

I prepared a code for INSERTING MODEL tab in current drawing:
 
(defun INS_DWG (TAB path dwg P / blk)(setq blk (strcat ""*" path dwg """));(setq N (vla-get-count (vla-get-layouts)));;Number of LAYOUT TABS in dwg(if (or(= TAB 0) (= TAB nil))(command "INSERT" blk P 1 0)); TAB=0 or omitted ==>Insert MODEL;(if (= TAB 1));==>Insert the 1st LAYOUT in dwg file;(if (= TAB 2));==>Insert the 2nd LAYOUT in dwg file;and so on....);;;usage:;;(INS_DWG 0 "c:\test\" "test.dwg" '(0 0))

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

AutoCAD Visual LISP / AutoLISP :: Princ Lines Not Showing Up

Nov 7, 2012

I am testing 2010 lisp routines in 2013. One thing I noticed is princ lines are not showing up on the command line until after the lisp routine has finished. Is there a setvar that controls this behaviour?

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Draw Triple Or More Lines

May 8, 2013

Lisp code here for draw for example triple parallel line ? each line will be own layer and color..

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Routine For Rotating Lines

Jul 23, 2013

LISP routine for rotating lines so that text in linetypes always reads from left to right?

I use the QUERY command to create basemaps and often the lines that are imported read upside down or backwards or however you prefer to look at it.  Most often, if I look at the XY coords of these backwards lines, the End X coordinate is of a higher value than the Start X coordinate.

Looking for something that would compare the two X coordinates of a line, do some sort of an IF Start X > End X, and if its true, store the XYZ coords of the Start and End in some variable, and swap them.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Calculate Angle Between Two Lines

Apr 10, 2002

I have about 30 profiles with water pipe lines that I need to measure all their vertical angles. since the vetical scale is exaggerated so I can't use the acad angular icon tool bar. Only thing I cant think of is to block each run then import them back in at 1/10 in y direction. How to get this done faster or more direct by any other methods.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Code To Convert All Lines

Sep 18, 2013

I need a lisp code to convert all Lines, Polylines, Arcs and Splines to Polylines with 0.4 width.

I prepare this:
(defun c:CH2pl ( / SS);changes all lines, plines, arcs and splines to POLYLINE with 0.4 width(if (setq SS (ssget "_X" '((0 . "LINE"))))(command "_.pedit" "m" SS "" "Y" "w" 0.4 ""))(if (setq SS (ssget "_X" '((0 . "*POLYLINE"))))(command "_.pedit" "m" SS "" "w" 0.4 ""))(if (setq SS (ssget "_X" '((0 . "ARC"))))(command "_.pedit" "m" SS "" "Y" "w" 0.4 ""))(if (setq SS (ssget "_X" '((0 . "SPLINE"))))(command "_.pedit" "m" SS "" "Y" 10 "w" 0.4 "")))

 But I want pure lisp code in a professional way!

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Create Many Lines With Its Data

May 28, 2012

I want to make many object cooper lines in autocad and each line has some data about its length, size, type etc.  that can then extract to excel as a Bill of materials. 

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Join Multiple Lines Together?

Aug 3, 2013

I want to join multiple lines together like join command but with multi selection.

View 6 Replies View Related

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 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 :: Rotate Multiple Lines Around Their Midpoints?

Jun 11, 2007

I ment midpoint instead of center.Is it possible to select several different line entities and have them each rotated around its midpoint, or end point, so afterwards all have the same direction specified by a number or specified by direction of another entity?I wish command matchprop had that rotation option in its Settings.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Code To Draw Grid Lines

Jan 1, 2014

I have this code to draw grid lines within a rectangle:
 
;Variable settings(defun var_set () (setq *var_lst* '("cmdecho" "osmode" "expert" "plinewid" "dynmode") *var_usr* (mapcar 'getvar *var_lst*)) (mapcar 'setvar *var_lst* '(0 0 2 0 0)) (vl-load-com))(defun var_reset ()(mapcar 'setvar *var_lst* *var_usr*)) (defun *error* (msg) (if (not (member msg '("console break" "Function cancelled" "quit / exit abort" "" nil)) ) (princ (strcat "
Error: " msg)) ) (and ;(vl-bt) (var_reset) ) (princ) ) (defun string-list (data) ;by lee-mac @theswamp (if (vl-string-search "@" [code].........

The above gets me the grid lines; but I have a block inserted at both ends of the grid line; how do I get the selection of those entities (selection set "frame") after each array?

or I would need to map a point list and draw each grid individually how do I go about that?

Attached is the sample of the output I'd like to achieve using LISP.

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







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