AutoCAD Visual LISP / AutoLISP :: Convert List Of Numbers To A Range Of Missing Numbers

Jul 18, 2013

I have subroutine that retrieves a list of detail numbers in a drawing. Sometimes there are missing numbers. I am looking to find a list of any missing numbers.

Example -

(setq List_DN (list 1 2 3 5 6 7 10 11 12 17))

Missing numbers are - 4,8,9,13,14,15,16

I would like a subroutine to take the List_DN are return the following missing numbers as text

(Get_Missing List_DN)
return
4,8-9,13-16

View 9 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Sorting A String Of Numbers

Aug 31, 2012

acad_strlsort will sorts strings, but what if my list looks like

("1" "2" "3" "10" "11" "12" "20")

i am sure i have seen it done ina simple way using vl-sort or vl-sort-i

but am not able to find...

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Get Serial Letters And Numbers From Existing Ones

Mar 2, 2013

Lisp file to get serial letters and numbers from existing ones,

I got a lisp file (attached) from experts in the form which does generate serial letters and numbers from existing ones.

The issue with this lisp file is that it doesn’t give the opportunity to choose the direction of numbering (top to bottom/bottom to top/left to right/right to left) as shown in the screenshot below

How this lisp can be developed to give the user the chance to choose the direction of numbering?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Adding Numbers Which Increasing In Blocks

Apr 5, 2012

I have draws with a a lot of layouts.In each layout, there is a block (CARTOUCHE) with a an attribute (PAGENUMBER)

I am looking for a way to select the block in my first layout, indicates a number for my attribute (PAGENUMBER). The lisp will automatically increase the attributes of the next others layout. How can I start this lisp.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Draw Line Between All Matching numbers That Are Repeated 3 Times

May 22, 2013

I'm looking for a lisp routine that will draw a line between all matching numbers that are repeated 3 times or more in a selection.I'm using AutoCad 2012.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Adding Numbers In Sequence Underneath Dimension Lines

Apr 16, 2012

I have an opportunity to make a good impression at a new job, but ive never had the initiative to learn how to write a lisp routine. at my work we make walk-in coolers and freezers. these coolers are modular with a standard wall piece measuring a certain length. these wall sections have to be numbered sequentially. is there any way to automate this? sometimes we get change order from the client and it means going back and manually changing multiple texts (sometimes in the hundreds), but i thought if there was a way these wall sections could be scheduled somehow that when a new wall panel is inserted in the beginning of the sequence it would update everything after it automatically.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Convert Every Element Of List To String

Jul 17, 2012

I have a list of (0 .4 .8 0 10). I want to convert every element of the list to string.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Convert Polyline - Bad SSGET List

Feb 5, 2013

I have a data structure called LayerList in the format [LIST "LayerName" "Linetype" Thickness Color]I then use the following piece of code to go through the structure selecting polylines and converting all polylines on a given layer to the correct thickness

   (foreach layr layerlist
       (setq player (car layr))
              (if (setq ss (ssget "x" '((0 . "*polyLINE") (8 . player ) )))
                      (command "pedit" "m" ss "" "w" 0.15 "")
                      (princ "
No polylines exist!")
      )
   ) 

However all i keep getting is Bad SSGET list value at the command line,

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Convert List With String Or Lists Of Strings To Text

May 22, 2013

Someday the light bulb is going off and I will understand mapcar and lambda. However.....I have a program that reads an excel file sheets. Sometimes the sheet only has 1 column, sometimes 2 or more.

I need to convert the saved values from the sheet to a list with the text spaced evenly. Unfortunately the text lengths vary. I would like a subroutine to pass the list to and return a list of strings with text aligned with padded spaces allowing for the longest text in each column. I am using the new list in a dialog box with fixed_width_font=true (so columns align).

Example 1-

(setq List1 (list "Col1-Line1" "Col1-Line2" "Col1-Line3-longer" "Col1-Line4"))
(AlignText List1)
returns
"Col1-Line1"
"Col1-Line2"
"Col1-Line3-longer"
"Col1-Line4"

so no padding needed

Example 2 -

(setq List2 (list (list "Col1-Line1" "Col1-Line2" "Col1-Line3-longer" "Col1-Line4") (list "Col2-Line1-longer" "Col2-Line2" "Col1-Line3" "Col2-Line4")))
(AlignText List1)
returns
"Col1-Line1        Col2-Line1-longer"
"Col1-Line2        Col2-Line2       "
"Col1-Line3-longer Col2-Line3      "
"Col1-Line4        Col2-Line4      "

 Example 3 -

(setq List3 (list (list "Col1-Line1" "Col1-Line2-longer" "Col1-Line3" "Col1-Line4") (list "Col2-Line1-longer" "Col2-Line2" "Col1-Line3" "Col2-Line4") (list "Col3-Line1-longer" "Col3-Line2" "Col1-Line3" "Col3-Line4")))
returns
"Col1-Line1        Col2-Line1-longer Col3-Line1-longer"
"Col1-Line2-longer Col2-Line2       Col3-Line2       "
"Col1-Line3-longer Col2-Line3      Col1-Line3       "
"Col1-Line4        Col2-Line4      Col3-Line4       "

View 5 Replies View Related

AutoCAD Inventor :: ILogic Range Between Two Numbers Not Working?

Apr 3, 2013

I would like to use the if else parameter in iLogic to set up a range, but I'm not getting it right.

What should happen:

if the variable 'breedte' is:

-       0 up to 3800; thats OK

- 3800 up to 4000; thats not OK, use 3800 instead

- 4000 and up; thats OK

Therefore I wrote this script, but when I enter a number between 3800 and 4000 (like 3900), the MessageBox appears (thats good), but the size of my solid results in 3900, instead of 3800.

breedte = InputBox("What is the breedte?", "Hoofdmaten", "")Parameter("skelet.ipt.breedte")=breedteIf breedte <= 3800 Then breedte = breedteElse If breedte >= 4000 Then breedte = breedteElse If (breedte >= 3801) AndAlso (breedte <= 4000) Then breedte = 3800 MessageBox.Show("This breedte is not possible." & hoogte & vbCr & "The value of 3800 will be used instead.", "Problem message", MessageBoxButtons.OKCancel, MessageBoxIcon.Asterisk) End If

View 2 Replies View Related

AutoCAD Civil 3D :: Range Of Point Numbers Makes 3D Line Segments

Jan 29, 2013

The command for Creating Lines by Specifying a Range of Point Numbers makes 3D line segments. Is there an option to make a zero elevation polyline running through cogo points that are 3D (the 3D line segments occur even if the cogo points are set to flatten elevation)?

View 5 Replies View Related

AutoCAD Inventor :: Balloon Numbers Don't Match BOM Item Numbers

Feb 20, 2012

I am trying to link my parts list to a drawing however all balloons have different numbers. 

I open the assembly and check everything out from vault I open my bom and change item numbers. When I get back to my drawing and apply for auto balloon I get completely different item numbers in my balloons. We just updated our software to a new 2012 version so it's maybe something with set up. 

View 9 Replies View Related

AutoCad :: Syncing Callout Numbers To Correspond With Note Numbers

Jun 20, 2011

Is there a way to sync callout numbers to correspond with note numbers. When I add or delete notes in my drawings it takes to much time to update the callout number in the drawings. I need to figure out a way for the note and corresponding callout to change at the same time.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Segregate Closed Polylines In Drawing By Area Range?

Mar 21, 2013

I need to segregate closed polylines in my drawing by area range. Ideally, I would input the number of ranges I need.

Then somehow find the smallest and largest pline area to determine the range values (rounding up to a sensble number)

Then with the ranges determined the polylines would be segregated and moved to new layers.

I've been trying to hobble together pieces but with no joy.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Ultra-pipe (Drawing Name Versus Circuit ID And TML Range)

Sep 12, 2012

For those who are familiar with the Ultra-Pipe Program, when I open a drawing from Ultra-Pipethe title layer is updated by the kbupdate.lsp file and the drawing decription (title Layer) is updated with the Circuit ID and TML range.  Referencing the attached pdf, you can see that this would be misleading in some cases.  I need the description in the title block to be updated with the drawing name instead.

We have changed the default layer colors before in the kbupdate.lsp so I know it's not impossible.  I am 99% sure that the changes needed for the problem above would be in the same file.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Add List To A List

Jul 15, 2013

I have a list -

(setq List1 (list "Line A" "Line B" "Line C"))

I would like to add each item in an existing list to a new list -

(setq ListNew (list "This is some text" "This is more text"

the following is the part I can't figure out - it just adds the list to the list, not the individual items

(mapcar '(lambda (x) x) List1)))

I am looking for ListNew to be - (a list with 5 strings)

"This is some text"

"This is more text"

"Line A"

"Line B"

"Line C"

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Add String To Each Item In List Using Lisp

Nov 14, 2013

I have a list ("temp.dwg" "temp2.dwg") and would like to add the string "insert text here" into each item in the list resulting in ("insert text heretemp.dwg" "insert textheretemp2.dwg").  how would i go about doing that using LISP?

View 2 Replies View Related

Paint.NET :: Changing Numbers And Adding New Numbers?

Jul 8, 2012

I hereby have a school note report from my little brother. He told me he had some bad notes in his last period and I would like to make a fake copy of it.

Basically, I scanned his 3th period notes and I would like to change some and add some

How you can remove numbers and add new ones over it and add numbers with the same digital code used on the old ones to put those in empty notes

View 5 Replies View Related

AutoCAD Civil 3D :: Get A List Of Available Point Numbers?

Feb 26, 2013

I just had an internal request for this and I had to look it up. So I'll share what I found and have a place to find it myself next time.
 
One way to do it is to select a COGO point to bring up the COGO Point Contextual menu tab. In COGO Point Tools you can select List Available Point Numbers.

View 9 Replies View Related

AutoCAD Inventor :: Item Numbers Blank In Parts List?

Feb 19, 2013

For some reason the item numbers in my parts list are blank. All the other information populates. 

I've gone to the assmebly and varified that the BOM tabs are active and there are numbers in there. 

If I inser the parts list as 'legacy' it works fine. 

I can't use the renumber function, it just makes all theh item number boxes go yellow in the parts list box, 

Inventor 2013. 

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Sorting A List

Aug 17, 2012

I have a list that contains data like this,

"Tree-01-08-AA5"
"Tree-04-12-QV"
"Tree-10-30-QS"

How would I go about sorting this list by AA5, QV, QS? I know how to use vl-sort and reverse, but I do not understand how I would go about this. 

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: File Name In A List

Aug 26, 2012

I have a list like ("a.dwg" "b.dwg" "c.dwg") and an filename "b.dwg"

I want to know if the file name is a part of the list. which function must be used for this?

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Add Scales To List

Oct 13, 2013

I need to modify the code below.

When I run the command and write the scale, I need to change the name of the scale and the ratio automatically. The ratio should always be in the format "1: #", also the name of the scale. Maybe assigning more variables with "setq", I do not know.
 
(defun c:test ()(setvar "cmdecho" 0)(setq name (getint "
Type the scale you need:"))(setq ratio (strcat "1:" "0.1"))(command "-SCALELISTEDIT" "Add" name ratio "Exit")(setvar "cmdecho" 1)(princ))

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: List To String

Jul 11, 2013

Here's one that I could use on that i can't figure out:

I have a list of a bunch of descriptions that looks like this:

("00.02.00" "CTD01 Mainframe PT1 (top)" "GD01")

What I am doing is grabbing the middle item and i need to break this up into 2 lines.  So, my code below grabs the first 3 "words" in the second item in the list and puts them in a list, but I need to convert this back to a string.

(setq desc6a (list (car (read (strcat "(" (cadr input6) ")" )))(cadr (read (strcat "(" (cadr input6) ")" ))) (caddr (read (strcat "(" (cadr input6) ")" )))))

I tried a bunch of ways but can't get it

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Get The NEXT Element Of A List?

Apr 25, 2013

I've been experimenting with lists and I'm curious about the fastest / easiest way to get the next element from a list:

Currently my best shot is to wrap (member 2 '(1 2 3)) with: (car(cdr (member 2 '(1 2 3))))

View 9 Replies View Related

AutoCAD Inventor :: Item Numbers Missing From BOM

Oct 15, 2013

There a few dodgy things goign on with my BOM. 

I imported a BOM style from another drawing that worked fine, but when I edited the names of teh columns it broke everything again. 

THere's a few thigns wrong. 

There's no item numbers. 

It says the QTY is incompatible units????

And there's teh funny table like icon with an arrow pointing to it with my parts highlighted blue. What does this mean?

Again, everything was fine until I changed the names of the columns and changing the naems back doens't fix it. 

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Exporting List Of Objects

Jan 6, 2012

How to export to a txt file a list containg all the objects on the current layer and their properties?

To be precise, I would like to export the following items from a selection of plines:

- ObjectID;
- Start Point;
- End Point;
- Vertex Points;
- Width.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Appending Associative List

Jul 17, 2012

Here is the code snippet from my program, I am trying to build a associative list from two regular lists in the while loop.  Does ""append " or "cons" only work for simple lists? Given attributeNameList attributeValTypeList which are always of the same length

(setq listCntr 0)
(while (<= listCntr (length attributeNameList))
  (setq attrTagTypeAssnList (append attrTagTypeAssnList (list ((nth listCntr attributeNameList)  (nth listCntr attributeValTypeList))) ))
  (setq listCntr (1+ listCntr)
)

How can I dynamically build the association list.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Subtracting List From A Variable

Sep 17, 2013

I've created a list and want to subtract all the values within it from another variable, and assign it to a new variable. How do I do it?

Basically, I ask for ground level (assigned to variable G1), and then any number of depths beneath that (assign to list LVLLIST), and I want to return the value of the bottom point. So it's all the values in LVLLIST added together and subtracted from G1. And assign it to a new variable BASE.

For example,

G1 = 650.00
LVLLIST = (1.23 23.26 0.13 50.23)
(setq BASE (- G1 LVLLLIST))

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Data Populated From List

Oct 7, 2011

In the example given I have two instances to show how unique the information can be.

I would like the left column of words to be some type of drop down or list so that the user does not have to type these for each line. I don't care if it's attribute, text, mtext, just whatever gets it done.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To List All Of Loaded Programs (LSP / FAS)

Jun 11, 2013

I want to list all of loaded lisp programs in AutoCAD (both .lsp and .fas) It's easy for .ARX files: (vlax-safearray->list (vlax-variant-value (vlax-invoke-method (vlax-get-acad-object) 'listarx)))

View 9 Replies View Related







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