AutoCAD Visual LISP / AutoLISP :: Select / Highlight All Items In List Box?

May 6, 2012

How can i select/highlight all items in a Multi_select list_box? 

View 4 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Selected Object Is In XRef To Highlight

Aug 15, 2013

I think there is a function that will cause the selected object that is in the XRef to highlight.

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

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 :: Place A Line Behind Other Items

Nov 13, 2012

I have a lisp file that reads in a point list from a text file and creates a number with a circle around it for every point, then a line from one circle to the next in line with the center point of each circle. Is there a simple way of making the lines "go behind the circles". The portion of code that creates the circles, lines and text is as follows and a cutout screen dump of what it looks like is below.

(setq amount 0)
(foreach item lines
;;;                                                              ;;
;;;  Create the text                                             ;;
;;;                                                              ;;
 (setq x (+ (atof (nth 2 item)) (car pt_origin)))
 (setq y (+ (atof (nth 3 item)) (cadr pt_origin)))

[Code]....

IV 2010

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

AutoCAD Visual LISP / AutoLISP :: Union Items After An Array Polar

Mar 12, 2012

I would like to do an array polar for 4 items and union with the command "union" all of them automatically.. how can i do that in a lisp ?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Auto Offset For Selected Items

Jan 25, 2013

I wish to have a lisp than enable to do automatic offset base on some selection of lines ,circles or polylines object as shown in attachment.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Bounding Boxes Around Items With Extrusion Vector

Apr 1, 2013

I have 3d items exported from sketchup, that have extrusion vectors to them.the VLA-GETBOUNDINGBOX lisp function seems to return values from the block's coordinate system.

I need values as if there was no extrusion vector, in WCS.I am not clear on how to do this, as it seems like I want a fundamentally different box.Is there a way to recalc the box orthogonal to world coord system for each insert of the block? URL....

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Attribute For Only Items Visible On Screen

Mar 30, 2012

im trying to change an attribute for only items visible on screen why dose the follow in then work and the one there after not?

(command "_attedit" "N" "N" "A4LANDSCAPE" "MYDWGSTATUS" "*" "" (cadr (fnsplitl (getvar "dwgname"))))
(command "_attedit" "N" "Y" "A4LANDSCAPE" "MYDWGSTATUS" "*" "" (cadr (fnsplitl (getvar "dwgname"))))

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

AutoCAD Visual LISP / AutoLISP :: List Of Drawings From One Drawing To Next

Dec 5, 2012

I have the following string of code, that I'll write in everyone's start-up suite. I'm able to retrieve a list of files I want to modify, for whatever reason.  (One example, when plotting drawings with layouts, sometimes the shadeplot setting is wireframe, and not classic hidden, though it's been set up in our templates).

The huge question is, can I get a list of drawings to a variable in one drawing, and have access to that variable list, in the next drawing I open?  I'll iron out the bugs on read-only statuses, or manipulating drawing states later.

(defun GetDrawings ()
(setq currentpath (getvar "dwgprefix"))
(command "pspace")
(setq DrawingList (dos_getfilem "Select a file" currentpath "Drawing files (*.dwg)|*.dwg|All files (*.*)|*.*||"))
(setq ListOfDrawings (cdr DrawingList))
(setq DrawingPath (nth 0 DrawingList))
[code]...

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: List Layers By Their Index

Dec 11, 2013

I want to make a list of layers due to their index (order) in the "layers combo box" in the AutoCAD. I prepared this:

(defun c:ListLayers ( / a b)(setq a(list(cdr(assoc 2(tblnext "layer" T)))))(while(setq b(tblnext "layer")) (setq a(append a(list(cdr(assoc 2 b))))));while);end

But, It's not match with the order of layers.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: List Block Attribute Value

Feb 3, 2012

I'm looking for a lisp routine that will globally list all the values from a specific attribute tag within a specific block. The attribute tag is "COMMENT" and the block name is "FSD".

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Confirming Entry With Pop-up List In DCL?

Aug 15, 2011

How can I determine what was selected in the pop-up box and then using that for 1 of 2 things, either 1) Turn off the Edit Box for Hole Spacing if the selected option is 1(which would be value = "0" of the popup list) or 2) Making the portion where it confirms that the Hole Spacing Edit Box is filled out so that if the Pop-up List displays 1, it doesn't check the Hole Spacing Box. Below is the DCL and LISP that I'm currently using.

Here is my current DCL:
questions :dialog {label = "Information for Program";: row {: column {: boxed_radio_row {key = "Galv";label = "Galv Slot Required?";: radio_button {key = "Y"; label = "Yes"; value = "1";}: radio_button {key = "N"; label = "No";}}: boxed_radio_row {key = "Bevel";label = "Is Leg to Face

[Code].....

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 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Sort Association List

Jun 14, 2013

How can I sort  an association list?

for example:
(setq lst '((1 . "s") (12 . "t") (-7 . "u") (0 . "v")))
 should be sorted as:
((-7 . "u") (0 . "v") (1 . "s") (12 . "t"))
 { sort on: (car(assoc index lst)) value}

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Remove Duplicates From A List?

Feb 12, 2011

Searched NG and did not find anything.

Given a list remove from list if both (nth 0) and (nth 5) are duplicates in list

(setq dolist '
(("CABLE, MIL-C-24640/18D " "IAF" "A/R" "FT" "6145-01-224-9183" "-" "3XSOW-7" "C-LC(1), (2)")

[Code]....

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Assign Value To List Of Variables

Oct 31, 2013

I am unsure why my Lisp does not work.

(DEFUN C:Clear_values (/ GLBLS) (SETQGLBLS '(*DATEDRAWN* *DRAFTNAME* *JOBNUMBER* *OWNERNAME**JOBCOE* *PERMITREVDATE* *PERMITCONTACT* *HOMEBUILDER**SUBDIVISION* *ADDRESS**CITY* *STATE* *ZIP* *LOT#**PARCEL#* *NSCOORD* *EWCOORD* *STANDARDDETAIL#**SUPERNAME* *SALESMAN**GATECODE* *HOMEPHONE* *WORKPHONE* *ALTPHONE1**ALTPHONE2* *EMAIL1* *EMAIL2* *ACCESS**EXCAVATIONTYP* *EXCATDEMO1**EXCATDEMO2* *SKIMRUN* *AWLRUN*

[code]....

 I've tried several options such as (mapcar 'set GLBLS "%%") but nothing happens, and with the above code nothing happens; the code only returns nil.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Select All Viewports (LSP)?

Sep 26, 2013

I have the below code, which works great accept if the layout tab doesn't have a viewport.What am I missing?

(defun ViewportLayerUpdate ()
(setq OLDcmdecho (getvar "cmdecho"))(setvar "cmdecho" 0)(setq OLDnomutt (getvar "nomutt"))(setvar "nomutt" 1)
(if (setq ss1 (ssget "X" (list (cons 0 "VIEWPORT"))))(if (setq ss (ssget "x" '((0 . "VIEWPORT") (-4 . "/=") (69 . 1))))
 (command "CHPROP" ss1 "" "LA" "0-VPRT" "") ))
(if (setq ss1 (ssget "X" (list (cons 0 "VIEWPORT"))))(if (setq ss (ssget "x" '((0 . "VIEWPORT") (-4 . "/=") (69 . 1))))
 (command "change" "p" "" "p" "color" "bylayer" "")   ))

[code]...

Factory Design Suite Ultimate 2012
AutoCAD 2012 | Inventor Professional 2012 | Vault Professional 2012

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Select All In Macro

Jun 19, 2013

Trying to add this macro to a new command in my cui. Does Select all not work in macros?

^C^Clayiso;;_select;all;;_chprop;la;c-rway-x;;

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Associative List With Strings And Spaces

Aug 16, 2013

I'm making a program that reads a property file that follows the format:

"key=value"  for each line on the text file.

One specific line has the key "file" and the value is some file path that includes a space.file=C:/my folder/my file.txt
 
Now I can extract what the key and value is for any given line in the file.However, I want to put all of the data into an Associative List so that I will not need to keep opening the file each time I search for information. I've been using the cons function in order to create a dotted list, which is successful.  However I have an issue when I add this dotted list to the end of my associative list.

Suppose I have a key and a value already stored inside variables.  Below I have two lines of code, first the dotted list portion is printed, and works as expected.  The second line adds that dotted list to the associative list:

(princ "Cons: ")(princ (cons key val)) (princ "") ;Prints (file . C:/my folder/my file.txt)(setq assocList (append assocList (cons key val))) ;Error message here.
 
The error that I receive says "; error: bad list: "C:/my folder/my file.txt"..Here is the change:

(setq assocList (append assocList (list (cons key val))))

 Now, the dotted list is inserted properly and looks like this after printing the whole associative list: ((version . 1.0.1) (file . C:my foldermy file.txt))

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: List Of Coordinates For View Port

Oct 17, 2011

Is it possible to obtain a list of coordinates for view ports (with dxf codes or otherwise) similar to obtaining a list of (assoc 10) for polylines?

I'm aware I can get the center, width and height from the dxf codes, but what about for clipped view ports with irregular shapes?

View 2 Replies View Related







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