Inserting blocks with different layers

Discussion in 'AutoCAD' started by PC, Jan 28, 2006.

  1. PC

    PC Guest

    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
     
    PC, Jan 28, 2006
    #1
  2. PC

    sw Guest

    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.
     
    sw, Feb 1, 2006
    #2
  3. PC

    PC Guest

    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
     
    PC, Feb 6, 2006
    #3
  4. PC

    PC Guest

    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
     
    PC, Feb 6, 2006
    #4
  5. 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
     
    Boris the Spider, Feb 6, 2006
    #5
  6. PC

    R.K. McSwain Guest

    You can achieve this behavior using a dynamic block. (AutoCAD 2006)
    QSELECT or FILTER.

    If you just wanted to purge so you could insert an updated copy, you can
    insert like this [blockname=h:\myblocks\blockname] to redefine the
    current block definition.
     
    R.K. McSwain, Feb 7, 2006
    #6
  7. PC

    sw Guest

    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.
     
    sw, Feb 8, 2006
    #7
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.