Inserting blocks with different layers

Hello All I have about a hundred different hydraulic blocks in a drawing accessible via design center. I use the layer 0 to define line colors
when inserting into other drawings which works well. What I would like to know is, is it possible to have multiple layers on a block that can be assigned to a layer on insertion into a drawing. For example a DCV will have a pressure line, a tank line and two working lines all of which are different colors. Would it be possible to set the block up so that on insertion it asks for the layers for each of these lines separately? Sometimes the pressure line will be red for high pressure and sometime it will be blue for standard system pressure.
Also is it possible to have text in a block that stays horizontal if the block is rotated.
Lastly, is it possible to search for a block that is inserted in a drawing? For example recently I wanted to purge a block from a drawing but Autocad would not let me until I had found and removed all instances of the block in the drawing. This can be a time consuming process if the drawing is very large or contains a lot of similar blocks.
Regards
Phil
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
PC wrote:

I work with acad 2000 - they may have removed or replaced this, but there was an express tool SSX that would (among other things) search for a block by name. if the thing you want to do is that simple, there you have it.
When you say "text in a block" I have to say "no". if you mean attributes in a block, then I get to say "maybe". can't remember all the details, I don't need to do it very often. had a set of drawings with thousands of electrical devices and multiple attributes and various rotations of the blocks. may have been "the hard way" but I ended up with some lisp that would rotate the rotation angle of sected attributes to zero degrees.
your first question, why would you want to do what you describe? set high pressure pipe in one layer, low pressure in another and change the color of the layer after you insert it for a particular file.
or am I not understanding you?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Hello Roy I am using 2006. I could not find an express tool that allows you to search for a block by name.
I was refering to text in a block yes. For example a valve with four ports would be labeled A , B , P , T. These would not need to be changed when the block is inserted as in an attribute. Your lisp routine sounds like it would be useful in this situation and I will just accept the default values for the attributes when the block is inserted.
I can do as you say but then I would need to explode the block upon insertion which sort of reduces the usefulness of blocks.
Regards
Phil
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
PC wrote:

Phil & Roy,
For searching for the entire drawing for a particular block, use AutoCAD's Qselect command. This will search the entire drawing for your block that you want by name. Then you can delete the block or for that matter, any editing that you may wish perform. To search for the block, activate the command, up pops the dialog box with a bunch of drop downs. < For Apply to = select "entire drawing" < For Object type = select "Block Reference" < For Properties = select "Name" < For Operator = select "equals"\ < For Value = select your block's name. (Autocad will list all the a block that are in the drawing
This is one of AutoCAD's better commands. This command will work on any entity in a drawing. You can even perform nested searches. For example search for your block name then search within the return list of instances for those blocks that have a certain rotated value. I know I sound like a Salesman for Autodesk, but I use this command at least once a day. I also use it to convert drawings form other cad platforms.
Ted
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
PC wrote:

I must be a bit confused about your exact situation. If you want to be able to change the rotation of a piece of text in a block without then you want an attribute for the text. Text embedded in a block as just plain text rotate with the block.
I have not had the occasion to use them this way, but I believe an attribute can be set as a constant value and you would not need to even accept a default value on each insertion. It would just always be "A", or whatever. But you would be able to edit location and rotation without exploding the block.
My situation was that I had someone else's files with a multitude of blocks already inserted. They did not bother to have all their text rotated - this does not meet my anal retentive standards. With lisp you CAN grab a selection set of attributes and force the MFer's to a rotation angle of zed. I remember doing it, but I would have to search my support directory for that particular code snippet.
IF YOU WANT TO AVOID USING ATTRIBUTES and if you have a limited number of desired rotations I would create a block with pre-rotated text for each rotation angle..... My applications have been architectural, for things like fire alarm pull stations, and there are only 4 rotataion angles for the block. It's a square with an "F" in it, but I want the insertion point to be the middle of one side and ON THE WALL and I want all the "F"s to have zero rotation.
(it's easier to make the text an attribute with constant value)
If I had a couple thousand blocks already inserted with naughty text, I could make a selection set of the offending blocks, check the rotation DXF code of each and swap the block definition file for each with a predetermined alternate block. If the blocks already are inserted.
Lots of possibilities. Not sure I know yet what you need.
Cheers.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
With regard to your first item.. within your block file.. create a layer for each pressure setting. Then why not define the block in such a way that one line location actually has several different lines, each on the pressure layer that you might need. After block insertion.. just freeze the unnecessary layers. Easy to set that freeze scenario up with a toolbar or script.
Keep in mind however that if you want to insert another block of the same name from outside the file.. it will have to be identical in layer settings to the first block of that name that you inserted.
Xrefing the block into the drawing will prevent this problem.
Otherwise.. it seems that your looking at a lisp routine of some type to more or less "build" the block.
Roy has respoded to the other two of your three items.. attribues are definitely the way to go although you'll have to use attedit to revise their angle.. If you have autocad v2004 or beyond.. just doubleclick on the attribute and change the properties in the "text" options tab.

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Hello SW The problem with creating a layer for each setting is that the block could be inserted into a drawing that requires all of the pressure lines unfrozen. It would not be possible to create a variation of the layer for each block as there are around 100 different symbols and more to create. For your idea of a "lisp routine to more or less build the block" wouldn't that mean a different lisp routine would need to be created for each different block?
Regards
Phil
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Hmmm... I see... what you mean.
what about...
1) Making each block an xref.. that way the layers are separate and you can freeze them individually without affecting the other blocks. A bit intensive on the hard disk unless you have lots of ram.
2) Going back to the block idea.. create variations in the base block. Although you have possibly 100 insertions... you might have only 15-20 variations?
3) a combination of 1 and 2?
4) inserting the block with,, let's say a hub and a number of lines coming from it. Keep the nested lines on 0. Explode the block once it's inserted and change the lines to the desired layer. It's no longer a block but at least you have a typical configuration.
5) A lisp routine , just one necessary, could be written to prompt you as to which lines go to which layer.
Hope this,, or a combination of this, helps.

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.