AutoCAD Visual LISP / AutoLISP :: Delete Lines Shorter Than Specify Length

Nov 8, 2002

Is there any utilities that can select the entire drawing with the 2d polyline and erase all the polyline less than specify length (eg:10m,20m etc) ?

View 4 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Code Sum Lines Length / Multiplied By Constant

Aug 6, 2013

I have lisp code, which count total length, but I need that it count and multiply by constant which I choose manual (such as in example, total lines yellow length * y + total blue lines * x = ... , example 50*2 + 60 * 3=280), 

remember the another code, such as I have d200 with total l=1000 and d250 with total l=1500, i need to count total cost such as 1000*y+1500*x

one think, diameters numbers is not only 1 or 2, it can be many different diameters.

dwg file here:

[URL]..........

lisp file here:

[URL]........

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Length To Match Length

May 24, 2002

Command to make a line change length to match length of a line, arc, polyline or circle? Could use this when making flat patterns layouts.

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Line Length To Attribute Tag

Sep 30, 2013

Is there any simple code for to sum length of lines which is i am choosing and copying result to chosen attribute tag ?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Line Length Report

May 30, 2013

I am trying to create a report of line lengths based on linetype.

I have built a list that looks like this...

(("CUT4SS" . 859.566) ("CUT4SS" . 862.231) ("CUT4SS" . 927.651) ("CUT6SS" . 1158.48) ("CUT6SS" . 509.903) ("CUT6SS" . 2840.31) ("CUT4SS" . 967.76) ("CUT4SS" . 508.73) ("CUT4SS" . 111.065) ("CUT4SS" . 483.216))

I want to take this list and create a function to create a list of total lengths i.e. the CDR's.

(("CUT6SS" .total length)("CUT4SS" . total length))

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Retrieve Arc Length From Revision Cloud?

Oct 28, 2011

Is there any way to retrieve the arc length from Revision cloud and how can we identify that object is a Revision Cloud.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: DCL Radio Button Label Length

Jun 28, 2013

I am trying to revise an old dialog box so that I can add some new options but I'm finding it difficult to shorten the label for a radio button enough to get the box width to look reasonable. I read somewhere that Windows fonts cause the label lengths to hold extra space for each character. The webpage that I found this on said the solution was to make a new line for the label, which sounded great to me, but they did not tell how to do it. After much searching, I figured out how to add an additional line to the label, but my program now refuses to function correctly. I set the middle button before initiating the dialog in my lisp, but when I select a different option, the original button remains selected along with the user's choice. The program actually works, using the last button selected, but I really want the button to respect the pick by the user and deselect the default button.

This worked perfectly when I had only two selections, and it still worked perfectly when I added the third option, but it just doesn't like it when I try to add a new line for the long description in the middle of a radio column.

I'm barely functional with dialog boxes..

DCL in question:
:boxed_radio_column { label = "Location"; width = 20; height = 2; fixed_width = true; fixed_height = true; alignment = top; :radio_button{key = "sl-AD"; label = "Spring Lake Applications";} :text_part{label = " and Distributor Services";} :radio_button{key = "sl-BP"; label = "Spring Lake BP Systems";} :radio_button{key = "gr"; label = "Grand Rapids";} }
 
lisp has the following in this order:

load dialog - I have a loading function that works fine
(set_tile"sl-BP""1")
(action_tile"sl-AD"           "(TGW-Setup_01 $key)")
(action_tile"sl-BP"           "(TGW-Setup_01 $key)")
[Code] .....

Of course, these are just the pertinent sections of a much larger setup dialog, but I didn't think I needed to post all the functions that this program is doing, since you'd have a difficult time running this without my templates, printers and a number of support files.

Like I said, it seems to be choking on my adding :text_part {  Label = "      and Distributor Services";} instead of making this a single line of the label for the button above it.

Why does this cause the default radio button to stop releasing?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Centerline Along Length Of 3D Solid Shape?

Dec 10, 2013

Lisp to draw a line along the length of a 3d solid? I have some UB (I sections) columns and beams modeled and would like to select all solids and for it draw a centerline end to end

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: List Total Length Of Polylines

Jul 30, 2012

where I can obtain a freeware lisp routine that lists the lengths of all the polylines on a specific layer or within a selection set? I want to avoid list if possible as there are rather a lot of polylines!

View 2 Replies View Related

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 :: Put Circle To Line After Specific Length

Oct 3, 2013

I need a lisp which is i can draw a line or pline with circle in every 30 meters ( circle diameter and total line or pline length will be optional )

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Length From Both Side By Digit Entry?

Sep 5, 2012

i need any lisp that perform the Lengthen command from both side of Polyline by Digits Entry.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Length / Width Output Of Rectangle

Nov 26, 2013

I found a lisp in the net to create a rectangle by marking objects in a draw.

But it would nice to get at the end of the lisp after creating the rectangle a output in the command line about the length and with of the created rectangle.

who can add the code for the length/width output?
 
(defun C:wer (/ AUSWAHL INDEX ELEM XYMIN XYMAX MINX MAXX MINY MAXY DATA A) (vl-load-com) (if(and(or (and (setq AUSWAHL (ssget "I")) (> (sslength AUSWAHL) 0)) (and (setq AUSWAHL (ssget)) (> (sslength AUSWAHL) 0)) ) (or(setq A (getreal "
Randabstand <0> : ")) (setq A 0.0) ) ) (progn (setq INDEX -1) (repeat
[code]........

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Pause For Certain Length Of Time 5 / 10 Seconds

Jun 9, 2012

How do I pause for a certain length of time 5 seconds or 10 seconds.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Retrieve Length Value Of Single Entity

Feb 27, 2012

When we launch the list command, the Area system variable holds the area value of the selected shape.

How to get the length value into an Autolisp program to use it?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Adjust Column Width To Length Of Text

Apr 27, 2012

Several times, we generate a drawing, and the text widths in the columns vary greatly.  Some have text that is ten characters long, and others have thirty-plus characters.

Is there a way to be able to select the table (or perform the command to all tables in the current layout) and have each of the columns expand to the appropriate width, that depends on the longest string of text in that column, for each column.  The problem I see, is that some tables have two columns, some have six, and of course other with any number in between.  The same is also true for the amount of rows.

View 7 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 :: Reactor - How To Change Xdata Length If Line Is Modified

May 18, 2010

I need a Reactor to Modify Xdata - Length - contained in Line Object if this Line is modified (stretched, breaked, trimmed, etc).The routine need to verify if Line contain Xdata and modify it (and works with multiple selection).

I tried for long hours, but without success. I tried to create a list of entities while the reactor is applied, but doing so need another reactor to change these entities after the first Reactor works.The codes I used are below:

{code}
;If it just 1 string only you want to add
(defun add_xdata_str (e a v);;;EName APPID String_value
(and (not (tblsearch "APPID" a))
(regapp a))
(and (= (type e) 'ENAME)
[code]....

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Total Length Of Selected Object And Summarize Them A Table

Jan 4, 2014

I need a lisp file that can read the total length of selected object (lignes, polylines) and summarize them by layers or by color in a table

e.g

command:tl (total length)
select objects
found total length.......
select object (Ent)
total length or [Add/Subtract/Table] :
total length = .......
if table
Enter an option by [ Layer/Color/line Type/line Weight] <layer> :

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Count Dynamic Block Including Total Length?

Apr 2, 2012

lisp to count dynamic block including total length.

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 :: Can't Delete All Layouts?

Mar 4, 2013

Why can't I get this to work?... okay, it is being used via AcCoreConsole.exe

I get the following...  

; error: bad argument type: VLA-OBJECT nil

(defun delAllLayouts ()
 (vl-load-com)
 (vlax-for item
    (vla-get-Layouts
      (vla-get-ActiveDocument
 
[Code]....

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Delete All OLE Objects From Drawing

Nov 26, 2012

how to delete all OLE objects from drawing by most efficient way.

There are abt 150 drawings, each has from 2 to 20 or so OLE objects which need to be deleted. OLE objects are on many paper spaces.

I tried to use qselect but it selects only what is in current space.

Would need some lisp or some other methode than all can be deleted (excluding those which resides in blocks).

Tried also yto use ssx and then erase but still it deletes only what is on current space.

Just as additional info, those OLE are all pictures, not xls files for example.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Delete Specific Block

Feb 13, 2013

I need to delete a specific block from current opened drawing by LISP command.

for example removing XREF attached is very easy:

(COMMAND "-XREF" "D" "FRAME")

I can remove "FRAME" XREF from drawing. Now, I want to delete a/all block with "TB12" name with same action!

(command "BlockDelete" "TB12")

so, how can I delete a/all block with specific name in current drawing?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Delete Offset Line

Sep 6, 2013

There are many lisp that draw offset line but what about opposite way , I have wall of double line i need to delete one of them let's say inside wall line .

why i need to do this usually when i tracing in external program like autocad architecture or Revit or archicad  i just need outline of exterior and interior walls !.

is there way that can delete the offset line  ?(or within range predefined in lisp to prevent interfering of lines deletion).

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Delete Text Style Not In Use?

Nov 29, 2012

I cannot purge a textstyle out of my drawing. When I run purge nothing is available.

However if I select the style from the style dialog I am able to select delete and delete the style.

When I use the method on the style (vlax-invoke-method style 'Delete). AutoCAD states:

Automation Error. Object is referenced by other object(s)

The style is defenatly not in use but may have been used in the past.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Layer State Delete

Feb 20, 2013

i have a small lisp and i would like for it to:

when i invoke the plot command, it will first check if there is a layer state called "Temp"if "Temp" exists, then delete "Temp", then re-create "Temp", then switch layer state temporariliy to "Plot" to plot the file, and then switch back to the "Temp" layer state againbasically, the "Plot" layer state will be set based on how the drawing(s) will plot. if a user makes changes here-n-there in the drawing, when the user wants to plot, the software will save current state as "Temp", plot using the "Plot" state, and switch back to "Temp" state at the end. all i am trying to achieve is to somehow over-write the "Temp" state. below is the LISP.
 
(command "undefine" "plot")
(defun clot ()
(if (layerstate-has "Temp")
(layerstate-delete “Temp”)
)

[Code]....

Civil 3D 2013 SP1, Win 7-64 bit
12GB RAM

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Delete Linetype In Drawings

Nov 6, 2013

I have some drawing that contains PHANTOM2 linetype.

I can't delete this linetype from my drawings!

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Delete Duplicate Menus

Apr 20, 2011

A plugging we use has just updated and loading double menus causing error messages prompting that menu already exists unable to load.

In my cui the menus are loaded in my enterprise as well as my main.

How do I keep the menu with the same name in my enterprise yet unload the one of the same name in my main (where it shouldn’t be) using lisp (I want to Automate this using lisp, since I'm not always in office at the same time as everyone else)?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Delete DWG File Properties?

Mar 5, 2010

I am looking for code that will delete all the properties within a DWG file.

Searching the forum, I found the following

; Remove any existing Properties
(dictremove (namedobjdict) "DWGPROPS")

However, further research (forum, testing and help system) indicates that it no longer applies to current releases of AutoCAD so my initial happiness was short-lived!

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Delete Empty Block?

Jan 29, 2013

The below gets the block names of empty block records. The blocks may or may not be actually inserted in the dwg. In my case though, apparently they are nested in other blocks in the drawing I am working with... but it looks as if they are part of deeply nested block definitions and therefore cannot be purged.  I checked a couple blocks (the code returns over 1000 in my case) it returns and there are no objects in its definition.

How can I force them out of a drawing - and hopefully reduce it's file size?

(defun NullBlocks (/ block *thisdwg* block nullblocks)
(setq *thisdwg* (vla-get-activedocument (vlax-get-acad-object)))
(vlax-for block (vla-get-blocks *thisdwg*) ;iterate block table
(vla-get-Name block)
(if (= 0 (vla-get-count block))
(setq nullblocks (cons (vla-get-name block) nullblocks))
)
)
nullblocks
)

View 1 Replies View Related







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