AutoCAD .NET :: Change Attribute Color / Layer Per One Block Only

Jun 19, 2013

I've read this post:

[URL]

Everything works fine, but I have one problem.

I just want to change colors for all objects in current model space. But this command also changes attributes/blocks definitions (I mean, any new block which I insert has the color that I specified previous).

Where I have to change the code?

View 4 Replies


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: Check Block Attribute Then Change Different Attribute In Block

Aug 31, 2012

select all blocks on certain layers in a drawing, check attribute CIRCUIT in each block if it starts with MS then attribute CONTROL = switched. I hope thats clear enough the way

(defun c:control()
(graphscr)
(Setq sc (ssget "X" '((0 . "INSERT")

[Code].....

View 1 Replies View Related

AutoCAD 2010 :: Change An Attribute From A Value From Another Attribute In The Same Block

Oct 5, 2012

What I really want to do is on our fire alarm blocks we have 3 different attributes one for the address, the candela and one for misc info. I want to make an attribute that takes the number from the candela (15,30,75or 110) and change a different attribute to a value depending on which candela we use (such as 15=.078, 30=.113, 75=.195 or 110=.259). But I don't want the .078,.113,.195,.259 to print out on paper, I want to export block information excel file so I can add up all values.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change All Block Element To Layer 0 Without Changing Color / Linetype

Sep 3, 2013

I have too many blocks with specific layers inside.

develope lisp can change all to layer 0 but keep color and linetype as it is.

I will use this as a part of script to change multiple block.

View 9 Replies View Related

AutoCAD 2010 :: Change Block Attribute And Apply That Change To Multiples?

Aug 14, 2012

i have tons of column tags but wants to change the distance between column size and the circle and make the font smaller. I can do this individually but can't do one by one..... is there any way i can adjust all by one command or one magic touch?

View 3 Replies View Related

AutoCAD .NET :: Change Block Attribute

Apr 20, 2011

How to access the BTR, read and write BRef, attDef, AttRef etc. But this has me stumped. There are a few different examples  but can’t find anything that works and don't know why.

I have inserted a block in modelspace, I have the BlockRefID and now want to change its attribute values. This finds the attributes tags but doesn’t write the sValue. Why it isn’t writing the value to the block.

Public Sub ChangeAttributeValue(ByVal BlockRefID As ObjectId, ByVal sTagName As String, ByVal sValue As String)

Dim doc As Document = Application.DocumentManager.MdiActiveDocument
Dim db As Database = doc.Database
Dim tr As Transaction = db.TransactionManager.StartTransaction()
Dim br As BlockReference = DirectCast(tr.GetObject(BlockRefID, OpenMode.ForWrite), BlockReference)
[code]........       

View 7 Replies View Related

AutoCAD Architecture :: Attribute Block Text To Layer 0?

Apr 1, 2013

I am ACA 2013.  I received a file from an equipment company and has these blocks that are huge in file size, so I am cleaning things up on them.  Their blocks have multiple layers in them with different colors and linetypes.  I see the setbylayer command and it works, but not all the time.  On some of the blocks, they have attribute text in them.  the individual lines of the attribute are on different layers.  I want to keep the info, but set all to layer 0.  then I can move it to the block to the layer I want. 

another question, is there a way to make an outline of a block?  Some of these blocks are so detailed that I want to make a simple outline and then delete the block.

View 3 Replies View Related

AutoCAD .NET :: Change Block Reference Attribute

Mar 7, 2010

I have an issue regarding nested entity.

I have a nested entity block reference. In this entity I have three blocks. if I change any of the block reference attribute definition in the nested block reference then it is changing the original block itself.

Actually I am getting the handle of the selected block reference in the nested Entity. and change the attribute reference later. but it is making change in the block itself and other block reference too.

Here is my

static public void CONTACTS()
{
Document doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
Editor ed = doc.Editor;
string contactName = string.Empty;//to hold contact name, from xdata
[code].......

View 3 Replies View Related

AutoCAD VB :: Change Block Attribute Default Value

Feb 15, 2012

I have a problem: There are a lot blocks in my DWG with 3-5 Attributes. I change the Values of the attributes in the .Text String but they aren't set as default values of the block attribute. Now i want to set the actual value as default / initialize value of the attribute without entering every time in the block editor

with the following code its possible to change the text string. I can set the attribut.textstring as default value?

Public Sub changedefault()
Count = ThisDrawing.ActiveLayout.Block.Count
For Index = 0 To Count - 1
Blockstring = ThisDrawing.ActiveLayout.Block(Index).ObjectName
[code]......

View 2 Replies View Related

AutoCAD .NET :: Block Attribute Text Color

Oct 31, 2012

I am looking to go through a whole drawing and change the text color of any block attribute to say 0 as the drawings I am receiving have all the text at a weird color. I was unable to find anything on the forum. I already have a routine that changes text of certain blocks based on layer, but I want this to change the color. Below is code I used for the layer change I talked about earlier.

publicstaticvoid strFind(string sFind, stringsReplace)
{
string str = "";
Document document = Application.DocumentManager.MdiActiveDocument;
Editoreditor = document.Editor;
Transactiontransaction = document.Database.TransactionManager.StartTransaction();
[code].......

View 1 Replies View Related

AutoCAD LT :: Not Enough Color Contrast Of Block Attribute

Jun 14, 2013

Whenever I edited the attribute of a block, just when I tried to fill in a new value in the "Value" column after thosed named "Tag", "Prompt", it was always a pain for me to find out on which row the new value was maintained, because the color contrast between the rows was too poor. See attached picture for more details.

Eager to know if there is a way to change the backgroud color in order to have a better contrast?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Block Layers Based On Attribute Name Tags

Oct 11, 2011

What I am trying to do is grab the value of the owner tag (of which there are four), and use that value to determine which layer to place it on.  What it seems to be doing is hanging.

Here is what I have so far:

(setq SSBlks (ssget "x"'((0 . "*INSERT"))))
(while (/= (sslength SSBlks) 0)
(setq w(sslength SSBlks) V 0)
(setq attentity (ssname SSBlks 0))
(setq attname (entget attentity))
(setq cntr 0)
(while (< V cntr)

[Code] ......

View 9 Replies View Related

AutoCAD 2013 :: Lisp Can Change All Elements In Block To Layer 0 Except Layer Defpoint

Sep 3, 2013

I need a lisp can change all elements in block to layer 0 except layer defpoint but still keep linetype, color as it is.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Transfer Attribute Block Values To Another Attribute Blocks

Jul 3, 2012

I wanna transfer my attribute block values to another attribute text blocks , is there any lisp for that?

Is there a possibility for sum tag values of choice attribute blocks to inside of another attribute text block ?

View 2 Replies View Related

AutoCAD 2013 :: Change Color Of All Elements Into One Color In Block?

Sep 4, 2012

How can i easy change the layer colors of all elements in a block and also the blocks in that block witout exploding everything ten times. I wish Autodesk create a button so if you select a block and use the button i had a choice to

select a layer or color. Looks so simple.

* setbylayer is not what i mean

* also don't want to use xrefs

View 9 Replies View Related

AutoCAD .NET :: Change Block Layer After Insertion

Jul 31, 2013

I've inserted a block into my drawing with this

....

Dim tmpDb As New Database(False, True)
tmpDb.ReadDwgFile(nombrebloque, System.IO.FileShare.Read, True, "")
Dim Transform As Matrix3d = Matrix3d _

[Code]...

and I would like to change some properties (layer, color,...) of the entities. (without modify the original block)

How can I access to these entities?

View 3 Replies View Related

AutoCAD 2010 :: Can't Change Attribute Value In Enhanced Attribute Editor

Dec 21, 2012

creating a block with attributes. I did manage to get my block set up and inserted in a dwg, but I am unable to change the "value" of any attribute. Unless I click on the "..." button next to the value field.

View 1 Replies View Related

3ds Max Animation :: Change Color Of Object Based Upon Custom Attribute Slider

Jul 17, 2012

I'm trying to determine how to change the color of an object based upon a custom attribute slider. It would only need to change between 2 colors. I know this can be done by simply autokeying but using a slider would be more useful for my situation.

Is there a way to do this? I've been playing with wiring a simple cube's material but am not sure how to do this.

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Block Layer

Jul 25, 2006

I have been filtering through this descuession group for a whil this morning looking for what I need and have found somethings that are close but haven't managed to change them a little to do what I am wanting..

I have drawings with a block named UG101 and has been inserted on all sort of different layers.

What I would like to do is run a lisp routine that would select all blocks with the name UG101 and put them on the layer CableInfo.

I have many other blocks that i need to do the same to but with different names, so I was hoping, I could change the lisp routine around to do the rest of the blocks in the drawing..

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change A Specific Attribute From Specific Block To Specific Value

Dec 7, 2011

I've had a simple lisp I've been using for years that suddenly disappeared.  It required that you identify a block name, tag name, and the value that you want the tag to be.  All of this is performed via command line, so it is scriptable.  Since I lost it, I've been experimenting with -attedit.  This command comes frustratingly close to what I'm looking for, except it only appends an existing tag, or replaces a specific string within the tag; I can't get it to replace the entire tag, regardless of its value.

1> Any lisp routine that does what I describe?
or
2> How to make -attedit replace a tag value without regard to what the value currently is (like a * wildcard)?

View 9 Replies View Related

AutoCAD 2010 :: Inserting New Block And Entering Attribute Data By Selecting Another Block?

Aug 13, 2012

Is it possible, via whatever methods (lisp?) to be able to have a premade block with an attribute and insert it into a drawing then assign a value to it by selecting another existing block in the drawing and using one of its own attribute’s values?

For example, say I have a block representing a telephone and it had an attribute called "PhoneNo" and I inserted it into a drawing showing an office floor plan that had blocks in each office space that are telephone junction boxes with attributes "PhoneExtension".  I would like to be able to autocomplete the entering of the “PhoneNo” data by selecting one of the telephone junction boxes in the drawing and using its attribute’s value.

View 5 Replies View Related

AutoCad :: Attribute In Title Block Exists In Block Editor But Not In Project

Sep 6, 2012

Autocad 2011, Electrical package,

I have an existing title block a few text attributes, to which I wish to add a watermark. I have added it in the block editor as a normal attribute, with the same details as the other attributes that work, only a different tag name. It has a default value, "DRAFT" and is tagged "WMARK". It works fine in the Block Editor, and If I test the block I can edit it to display whatever I want, but if I save the block and open it from Autocad proper, the attribute is not in existence, either as a default value, or editable from block properties, attribute editor or title block editor, whereas all of the other attributes are there. I have used BattMan to verify the settings of the attribute, and the only difference is that the others all have "L" in the "Modes" column, but I think that means that their position is "locked" whereas my new attribute is justified "aligned" therefore cannot be "locked" (This is some assumption on my part, as the documentation on the "Modes" column is almost non-existent). I cannot afford to waste much more time on this issue, as the boss is breathing down my neck, but editing watermarks on every drawing after every revision is frustrating, when it could be an attribute that is editable from the title block editor.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Match Multiple Attribute Values From One Block To Another Block

Feb 12, 2012

I need to match few attribute values from one block to different block. I download a lisp file called; ca.lsp which can match the single attribute value. I modified it for more than one attribute value matching. It is ok but still wish to overcome two issues for batch prcess

1. picking up the blocks by selection

2. click the alternative block numbers of times to match the numbers of attribute values I needed.

How to modify this lisp I can run it by block name selections instead of picking selection which enable me to run batch process for numbers of drawing? That will be good...

Lisp & Demo file attached (Match attribute value, A, B & C to Attribute 1, 2 & 3).

View 3 Replies View Related

AutoCAD Civil 3D :: Transferring One Block Text Attribute To Another Block?

Nov 8, 2013

Is there a way that I can create a block with text ('A') and when I insert the block and populate the block another block block will update also? I am wanting to create a block for x-sec flags, and detail callouts that update their detail titles.

AutoCAD Civil 3D 2012 SP4
Windows 7 (64)

View 6 Replies View Related

AutoCAD 2013 :: Importing Attribute Data From A Block Into Another Block?

May 30, 2013

I have 2 drawings with the following content :

Drawing 1 : Contains tree blocks that have a specific scale dependant on the tree size

Drawing 2 : Contains a block with just a point and attribute data about the tree (name, size etc.)

This block is approximatly at the same location as the tree block (0,1 m precision)

Problem I want to join these two items together. In other words, in the tree block that is scaled correctly i want the attribute data with the name, size etc. These blocks don't have a corresponding unique number or something like that.

View 2 Replies View Related

AutoCAD Inventor :: Block Attribute In Part Sketch Block

Feb 28, 2012

Is it possible to create a text block attribute in part sketch mode?

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Block Layer After Insertion

Mar 7, 2013

wondering if is possible to have a lisp routine to:After use the INSERT command, the routine will automatically change the layer of the inserted block to a specific layer according of its name.

i.e.

Step 1 : I will insert a block named Block A using the normal autocad INSERT command (I do not want to insert the block without the Insert window dialog box)

Step 2 : After the insertion, the routine will select the last insertion (or the last object, or any other best way to select this block and will take it's name)

Step 3 : The routine has a list that says:

(If the last insertion (or object) is named Block A, put it in the layer Layer A with color Bylayer and linetype Bylayer)             

(If the last insertion (or object) is named Block B, put it in the layer Layer B with color Bylayer and linetype Bylayer)

and so on... I can make the approprieated list by myself folowing my standards.

I think it will be nice to avoid an error if the block is not in the list. So:

(If the last insertion (or object) name is not in the list, do nothing)

To finish, it will be nice to create the layer if it does not exist. Also, Unlock, Thaw and Turn on the layer if it's Locked, Frozen or Off.

View 9 Replies View Related

AutoCAD 2010 :: Block In Xref Don't Change Color

Jan 30, 2012

How do i change color inside blocks on my xref? (much of the orginal file is builded in blocks). I need to have everything in color 8 (grey).

On attached pictures

The red, cyan and green is blocks on the orginal file.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change All Block Element To Layer 0 Except Defpoints

Sep 24, 2013

URL....i need a liitle bit change as my latest comments in that topic. I dont want to change defpoint layer to layer 0.

View 9 Replies View Related

AutoCAD Map 3D :: Layer Color Does Not Change On First Try

Aug 12, 2005

layer manager not keeping your color selection the first time when you attempt to change the color of a layer? I have not repeated the experience enough to know the particular situation under which this happens but the result is the same. I open layer manager, click the color swatch to bring up the color selector and select a color, select ok and ok. When I look at the layers color it did not change. It seems to happen most on newly created layers.

View 6 Replies View Related

Illustrator :: Change Layer Selection Color From Black To Color?

Jan 8, 2014

Somehow I've turned off the color selection so that I don't have a color when I select a part of a drawing on a layer. The drawing area stays black whether I have selected it or not and I don't know how to turn back on the color.
 
how I can turn on the color again so that when I select a line it changes from black to red or magenta or whatever?

View 3 Replies View Related







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