AutoCAD Visual LISP / AutoLISP :: Set Color On All Nested Xrefs

Nov 21, 2011

I want to set all the layers on all nested xref's to color 8.

View 9 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Nested Blocks In XREFS

Apr 21, 2008

I have an XREF that contain block inserts sometimes nested 2 or 3 levels deep. Given the block names, is it possible to find and translate the insertion point of the nested inserts to the current World UCS?

Ideally I would give a routine the block name and it would scan the current drawing and return a list of the translated insertionpoints>

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Color And Linetype Of Xref Nested Entity

Aug 22, 2012

I have a Lisp that I have been working on with some folks in the office, and i feel like i am close, but i am not getting the cigar. The idea would be to have the lisp allow the user to select a nested x-ref entity, and change the color and linetype of the selected layer, similar to the old "LAP" command (I know it is a dinosaur, but I still miss it). I seem to be doing swimmingly, code I have quasi-plagiarized. It seems to crap out where i try to pass the selected linetype back to the layer. I get the nastygram "Command: ; error: no function definition: GETLINETYPE" right after selecting the linetype from the dialog.

Code below...

x(defun c:CX (/ Sel EntList DataList cnt Num ClrNum EntData)
(if (setq Sel (nentsel "
Select object to change layers color and linetype: "))
(progn

[Code]...

HP Elitebook Workstation
Windows 7

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Get Name Of Nested Block

Nov 27, 2013

I need to pick a nested block in drawing, I prepared this code to get name of selected blocks:

 (defun c:test ( / e obj blkName)(while T (while (Not (setq e (entsel "
Select a BLOCK to edit: ")))) (setq obj (vlax-ename->vla-object (car e))) (if (= (vlax-get-property obj 'ObjectName) "AcDbBlockReference") (setq blkName (vlax-get-property obj (if (vlax-property-available-p obj 'effectivename)'effectivename 'name)) );setq );if (princ (strcat "
Block Name is: " BlkName)));while);defun

 But, how to select a nested block?

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Replace Nested Block

Aug 7, 2012

I have a dynamic block that has a nested temporary block inside it. What I am wanting to do is replace the temporary block with the permanent block. I have tried several different variation of coding but I cannot seem to get this bad boy to work. have used:

(vla-put-name (vla-item (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object)))) "tempBlockName") "newBlockName")

this gives me a duplicate names error. 

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Convert Nested Xref To Regular

Nov 7, 2013

Any routine or way to convert a nested xref to a regular xref?

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Multiple Ncopy From Xrefs

Oct 14, 2013

I have been using to copy multiple objects from x-refs. The problem I'm having is that when I have the user input prompts in a macro i can screw up the command if i accidentally miss picking my selection set. I'm new to LISP and having trouble with selection sets and selection filtering.

On another note: I'm trying to rename layers copied this way to remove the "$0$" and using the rename command swapping $0$* with * works, however in the -rename command it does not.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Moving XRefs To Another Layer

Oct 31, 2011

I have been looking around the web to find a quick lsp routine that will take all the xrefs in a drawings and move them back onto layer "xref" or "0" depending on what the design team wants.

The ones I have found don't work or move all the xrefs to separate layers.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Nested Drop Down List In A Ribbon Panels?

Feb 22, 2012

how to create a nested drop down list in a ribbon panel.

is it even possible. It must be, but I don’t know how Autodesk managed to do it in the C3D.cuix for the create ground data panel, point drop down.

second question, where is the icon for a drop down list saved.

looking at a C3D dropdown list icon there is no path to the icon, but when I create one it shows a path.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Possible To Retrieve Names Of All Nested External References

Sep 20, 2011

is it possible to retrieve the names of all the nested external references, and how should it be done?

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Remove All Attributes Including In Nested Blocks?

Jan 8, 2013

There is a quick way to remove all attributes, including in nested blocks. Looking some lisp in the forum, I can't find one code for remove this elements completely.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Renaming Relative Path Xrefs?

Oct 12, 2011

I have set up a master set of dwg. files we use to create our construction documents.  The files consist of a master file that xrefs base files.  All of our files are named using the project # first. (i.e. 2011001c.dwg).  I have set up the master set using x's to replace the numbers.

Here is how it works:

XXXXXXXc.dwg (master file) relative path xref's the following files.
XXXXXXXlw.dwg
XXXXXXXvlw.dwg
XXXXXXXeg
XXXXXXXfg
XXXXXXXtitleblock

note:  all of these files are saved in the same folder.

I am trying to find a way to keep the xref paths working when I copy the files to a project folder and rename the files using the actual job # insead of the x's as place holders.  As it is now, when I change the drawing name the reference is lost and I have to manually change all of the xref paths in the xref manager.  Is there a command, program, or lisp routine than can change the file names and update the paths automatically.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: How To Collect Xrefs Inserted By XATTACH

Jul 3, 2013

I have a LISP that use the XATTCH command. How can I collect xrefs inserted by XATTACH? It can be more than one xref.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Create Layer By Xrefs And Blocks?

Nov 15, 2013

who can share with me a lisp which can create layer by xrefs and blocks ( if this can be an optional , would be nice ) ?

even maybe lisp can create layer group filter with "XREF" group name and move layers to inside.

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Build Association list With Nested Association Lists

Sep 27, 2013

I need to build an association list with nested association lists.

Here is my current
(IF (SETQ SUBLST (ASSOC CATEGORY PLNTLST))(PROGN (SETQ PLNTS (CONS PLANTNAME (LIST(CONS 'SIZE (dict-get PLANTNAME "SIZE"))(CONS 'COLOR (dict-get PLANTNAME "COLOR"))(CONS 'QTY (dict-get CATEGORY PLANTNAME))) ) PLNTLST (cons PLNTS SUBLST) ))(SETQ PLNTS (CONS PLANTNAME (LIST (CONS 'SIZE (dict-get PLANTNAME "SIZE")) (CONS 'COLOR (dict-get PLANTNAME "COLOR")) (CONS 'QTY (dict-get CATEGORY PLANTNAME)) ))PLNTLST (CONS CATEGORY PLNTS)))
[code]....

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Select And Bind All Xrefs In Model Space

Oct 9, 2012

Any code that will select all xrefs in modelspace and bind (insert) them?

the   -xref  bind command requires explicit names and if I use * it will also bind my titleblock xref in paperspace which I want to avoid.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Drawing With Multiple Xrefs - Create Local Layer Filter

Aug 13, 2013

I often work on drawings which have multiple xrefs, each having up to 100 Layers or more, so the layer manager can be a bit difficult to trawl through to find a local layer to select.

I know how to create a local layer filter using the code ~*|* from the new filter area in layer manager.

Ideally all I want to have to type in is: LOCAL and then the local layer filter would be created, with the filter name being Local-Layers (or similar).

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Removing Nested Block From Main Block?

Oct 3, 2013

I get an AutoCAD drawing from my conveyor manufacturer who have buried a block (tagname) in all of their conveyor blocks.

The only way to remove them is to manually use BEDIT and erase the tagname block.

Is there a way through Autolisp to search all blocks in a drawings and if the tagname block is part of the definition of the conveyor block, erase the tagname block or redefine the conveyor block without the tagname block.

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Insert A Block / Explode And Rename Nested Block With Suffix

Nov 30, 2012

I have a block that i want to insert several times and revised each one to be different to do this i would have to insert it and rename the blocks that come in and then reinsert i would like to insert and have a lisp explode the main block and rename the other 2 blocks with a suffix at the end depending on how many times its in the drawing... can this even be done? My original block name that will be first inserted is "BENT PULLEY NOTES" it needs to explode after i drop it in and then there are 2 blocks within that called "Bent Pulley" and "Bent Pulley DYN" that i was hoping to keep the names but add a number at the end depending on how many are in the drawing already...

here is a lisp that i have found... it would work if i didn't have nested blocks and only wanted the one block to be insert and not explode...

(defun c:Test (/ e i name Bname )
(setq e nil)
(command "_.-insert" "Drawing1.dwg" pause "" "" "")
(if (setq e (entlast))

[Code] .......

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Flip Color From Bylayer To Color And Back

May 16, 2013

I am trying to flip between Bylayer and color 150. If cecolor is bylayer set cecolor to 150 and if cecolor is 150 set cecolor to bylayer. It seems so simple but it's not working.

(defun c:22 ()
(setq cc (getvar "cecolor"))
(cond 
((= cc "Bylayer")  (setvar "cecolor" "150") )
((/= cc "Bylayer") (setvar "cecolor" "Bylayer") )
))

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change All Lines In Color Yellow To Color 8?

Aug 7, 2006

i am looking for a lisp routine which can change all lines in color yellow ( in different layers) to color 8.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Select Color Dialog Box

Jun 21, 2013

using autolisp or visual lisp I want to open "Select Color Dialog Box" URL....and get RGB color code to my lisp.If I enter "color" in command line, i get color dialog box, but if I use this command in (command "color") I get more promts and not color Dialog Box.

I want to make a lisp routine which would ask for first color, second color and range of colors. And will calculate color range from first color to second color.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Changing Color Of Attribute?

Feb 8, 2013

Can you change the color of a block attribute with lisp like you can with the built in Enhanced Attribute Editor function eg

I can change the value of the attribute LAMP but can I also change its color from the color of the layer its created on?

(while (not (equal ck "SEQEND"))
(setq e1 (entnext e1)
e2 (entget e1)
ck (cdr (assoc 0 e2)))
(if (= (cdr (assoc 2 e2)) "LAMP")
(progn
(setq e2 (subst (cons 1 lamp)(assoc 1 e2)e2))
(entmod e2)
(entupd e1)
(setq ctr (+ ctr 1))
)
)
)

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Select Layer By Color

Aug 28, 2011

I am interested in a program that can select layers by its color, and then change those layers to a different color and add a prefix of Z- in front of those layers.

Example:

Layer Names:   Layer Color:   New Layer Names:   New Layer Color:
Wall                         2                    Z-Wall                       100
Berm                       2                     Z-Berm                     100
Fence                     2                     Z-Fence                   100

I found a program (below) that works pretty close to what I am looking for but not quite.

;;;  Change the color of a layer to another color by Jeff Mishler July 9, 2003
;;;  Usage - (lay_col_chg oldcolor newcolor
;;;  example: Command: (lay_col_chg 142 100)

[code]...

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Color In Ribbon

Jul 2, 2012

In our 2010 version users used the "OPT Color Control" in a toolbar. When we went to 2012 we switched our users to the Ribbon. I am not able to move this Control to a ribbon panel. I can place in a toolbar and it works okay. Best I could find is "ACObjectColorCombo", Object Color Gallery drop down. Unfortunately I find that this drop down doesn't handle a selection set the way the 2010 toolbar did. I find that one cannot reliably pick a selection and use this to change objects to color bylayer. I can pick the object prior to using the OPT Color Control and they work fine. I pick the same objects and use the Combo box and sometime they are found and change other times I pick one or two and they work.

Is there a way to move this toolbar control to the ribbon, it will not let me drag and drop to a panel in the CUI.

Is there another solution to change object(s) color in a drop down from a ribbon panel? I have tried searching but am not finding other commands or control with selection drop down in the CUI. (Our choice is not to use the Properties dialog. Which, by the way, does work every time on the objects.)

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Dimension Color By Layer

Oct 20, 2011

As a consultant we grey out architectural backgrounds for our sheets. We use the SetByLayer command to change the color of the objects in our sheets to gery out. The issue is with dimsensions. Dimension Line Color, Extension Line Color, and Text Color are all set at By Block as default and no one ever bothers to change it unless they are setting it to a specific color which is even more of a problem for us. You can edit the properties of an existing dimension and set Dim Line Color, Ext Line Color, and Text Color to by layer, I am looking for a way to automate this. Something that can search through a drawing, grab all the dimensions (even in blocks) and set everything by layer.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Color And Linetype Modified By VPLAYER

Nov 2, 2011

How can I get the color that a layer has assumed in an specific viewport, and the same for an specific Linetype when it changed with an VPLAYER command

I found a function LM:GetOverrideData ( layer / data )  ;; © Lee Mac 2010

but return me the same data if I hask about an specific layer in all vports, and in one of them the layer color is modified.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Color Of Drafting Tool Tip

Aug 24, 2012

I use the following lisp to control my window background colour,

;Setting window colour to crimson (uses OLE colour code system)...(vla-put-TextWinBackgrndColor(vla-get-display(vla-get-preferences(vlax-get-acad-object)))3937500)

However I would like to change the drafting tool tip background also using lisp, but I don’t know which vla-put-….. I need?

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Set Table Cell Background Color

Aug 19, 2013

I have created subroutines to build tables in AutoCAD.

What I would like to do is to is if a value in the table list (example a question mark), then make the background color of that cell color 1 (red).

List to insert as a table -
(setq List_Table (list (list "A" "?" "C" "D" "E") (list "11" "12" "13" "14" "15") (list "21" "22" "23" "24" "25")))
(Build_Table "Title" List_Table 3 5 0.1 1)

Here are the subroutines -

(defun Build_Table (TableName List_Table NumRows NumColumns RowHeight ColWidth /); P0 Table_Obj KW KK KT KL Blocks_Obj Block_Obj Block_Id)
  ;--set table scale-------------------------------------
  (setq Dscale 1.0)
  ;--get location----------------------------------------
  (setq P0 (vlax-3d-point (getpoint (strcat "

[Code] .......

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Color / Line Weight

Sep 21, 2012

I was trying to do one that can change color and line weight using a number provided by user. What i want to do is to ask a number to the user, 5 for example, and then change the color to 5, and the lw to .5. I was starting with this:

(defun c:ccv (/ eco lun ob cc clw)
(setq eco (getvar "cmdecho"))
(setq lun (getvar "lunits"))
(setvar "lunits" 2)
[code]......

but is not working, it has a bug with the clw variable.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Changing Color Of Selection Sets?

Jul 27, 2013

I need to create a command which could change a color of an allready existing selection set when activated. For example i have a command which creates a cube, where each specific group of lines were added to different selection sets. how can i recall any created selection set by its name and change its color?

View 9 Replies View Related







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