• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    Dynamic Blocks

    Reply
    *T Bennett
    Accepted Solution

    You gotta try visibility-add-eng-v1.1

    5527 Views, 161 Replies
    07-10-2009 09:33 AM
    Ok, the instructions aren't the clearest, however, when you get the hang of
    it you'll love it. Try to make my valve (attached) without using this lisp
    routine, you'll spend 10X longer.


    Here are the steps I figured out:
    ------------------------------------------------------------------------------
    Elements:
    Lines, arcs, splines, attributes, text, etc.

    1) Place all the elements. The location doesn't matter at first, so make
    them easy to select by not stacking things on top of each other.

    2) Add all the parameters/actions you want - DO NOT add any visibility
    states or lookups yet. Make sure your actions affect the things you want,
    and don't affect the things you don't want them to.

    3) Load visibility-add-eng.lsp.

    4) Add a visibility parameter using (visibility_add). Rename the parameter
    accordingly.

    5) Set this new visibility parameter active using (visibility-up). There is
    a little problem with the program here. When you have one visibility
    parameter active and you set a new one active, it gets hung up. Use the
    visibility state pulldown and select a state. Note the command line will
    ask you for a visibility state. Type ? to see those available, then type in
    any name you want.

    6) Add the states to the list of visibilities - DO NOT change the visibility
    of anything yet.

    7) Using (element-sel-current-del) select all the elements you do not want
    to be affected when you change this particular visibility state.
    For example: If I'm working on the "actuator" visibility states, I don't
    want my valve type to change if a person wants to use a different actuator,
    therefore, I will select every element that is not an actuator.

    8) Now you can make elements visible or invisible in the states you've
    defined. Do not bother changing the visibility of the elements you've
    removed.
    NOTE: if you draw a new object or copy something, it will not be removed
    from any visibility sets.

    9) Repeat steps 4 thru 8.
    -----------------------------------------------------------------------

    I did not list all the functions in this routine. Many I don't even know
    how to use yet, or why.

    Todd
    Please use plain text.
    *Jim Dee

    Re: You gotta try visibility-add-eng-v1.1

    07-10-2009 10:30 AM in reply to: *T Bennett
    This is really cool! There are so many blocks where I need multiple
    visibility states. I only discovered this two days ago and I've already
    started making more powerful DB's. I too have notice that you need to
    construct the DB in a very deliberate way for it to work, but once you
    figure that out its great!



    Thank you,

    Jim Dee

    www.caddee.com



    "T Bennett" wrote in message
    news:6216794@discussion.autodesk.com...
    Ok, the instructions aren't the clearest, however, when you get the hang of
    it you'll love it. Try to make my valve (attached) without using this lisp
    routine, you'll spend 10X longer.


    Here are the steps I figured out:
    ------------------------------------------------------------------------------
    Elements:
    Lines, arcs, splines, attributes, text, etc.

    1) Place all the elements. The location doesn't matter at first, so make
    them easy to select by not stacking things on top of each other.

    2) Add all the parameters/actions you want - DO NOT add any visibility
    states or lookups yet. Make sure your actions affect the things you want,
    and don't affect the things you don't want them to.

    3) Load visibility-add-eng.lsp.

    4) Add a visibility parameter using (visibility_add). Rename the parameter
    accordingly.

    5) Set this new visibility parameter active using (visibility-up). There is
    a little problem with the program here. When you have one visibility
    parameter active and you set a new one active, it gets hung up. Use the
    visibility state pulldown and select a state. Note the command line will
    ask you for a visibility state. Type ? to see those available, then type in
    any name you want.

    6) Add the states to the list of visibilities - DO NOT change the visibility
    of anything yet.

    7) Using (element-sel-current-del) select all the elements you do not want
    to be affected when you change this particular visibility state.
    For example: If I'm working on the "actuator" visibility states, I don't
    want my valve type to change if a person wants to use a different actuator,
    therefore, I will select every element that is not an actuator.

    8) Now you can make elements visible or invisible in the states you've
    defined. Do not bother changing the visibility of the elements you've
    removed.
    NOTE: if you draw a new object or copy something, it will not be removed
    from any visibility sets.

    9) Repeat steps 4 thru 8.
    -----------------------------------------------------------------------

    I did not list all the functions in this routine. Many I don't even know
    how to use yet, or why.

    Todd
    Please use plain text.
    *Jason Piercey

    Re: You gotta try visibility-add-eng-v1.1

    07-13-2009 07:37 AM in reply to: *T Bennett
    Are you confident such modifications will survive in other versions of
    AutoCAD? I glanced at the code which all seemed very confusing.
    I didn't spend enough time with it to determine what it is actually doing
    but I hope for the sake of your time, all your new and improved blocks
    don't fall apart or cause corruption.

    Good luck.



    "T Bennett" wrote in message
    news:6216794@discussion.autodesk.com...
    Ok, the instructions aren't the clearest, however, when you get the hang of
    it you'll love it.
    Please use plain text.
    *T Bennett

    Re: You gotta try visibility-add-eng-v1.1

    07-20-2009 10:59 AM in reply to: *T Bennett
    No problem. At the pace our company upgrades, we shouldn't have to worry
    about it for about 10 years.

    Win XP Pro SP2
    P4 3.06
    AutoCAD 2006

    Todd


    "Jason Piercey" wrote in message
    news:6217508@discussion.autodesk.com...
    Are you confident such modifications will survive in other versions of
    AutoCAD? I glanced at the code which all seemed very confusing.
    I didn't spend enough time with it to determine what it is actually doing
    but I hope for the sake of your time, all your new and improved blocks
    don't fall apart or cause corruption.

    Good luck.



    "T Bennett" wrote in message
    news:6216794@discussion.autodesk.com...
    Ok, the instructions aren't the clearest, however, when you get the hang of
    it you'll love it.
    Please use plain text.
    *T Bennett

    Re: You gotta try visibility-add-eng-v1.1

    07-20-2009 04:17 PM in reply to: *T Bennett
    The best solution is for AutoDesk to just add the flexibility of multiple
    visibility states. Until then, I'm going with this.

    Is anyone using it in AutoCAD 2010 or later?

    Todd


    "Jason Piercey" wrote in message
    news:6217508@discussion.autodesk.com...
    Are you confident such modifications will survive in other versions of
    AutoCAD? I glanced at the code which all seemed very confusing.
    I didn't spend enough time with it to determine what it is actually doing
    but I hope for the sake of your time, all your new and improved blocks
    don't fall apart or cause corruption.

    Good luck.



    "T Bennett" wrote in message
    news:6216794@discussion.autodesk.com...
    Ok, the instructions aren't the clearest, however, when you get the hang of
    it you'll love it.
    Please use plain text.
    Valued Contributor
    Posts: 57
    Registered: ‎06-27-2006

    Re: You gotta try visibility-add-eng-v1.1

    07-20-2009 11:14 PM in reply to: *T Bennett
    In AutoCAD 2010 it is OK.
    I'm preparing visibility-add-eng-v1.2 where some inaccuracies will be removed.
    Nikolay Poleshchuk
    http://poleshchuk.spb.ru/cad/eng.html
    Please use plain text.
    Valued Contributor
    Posts: 57
    Registered: ‎06-27-2006

    Re: You gotta try visibility-add-eng-v1.1

    07-28-2009 02:29 AM in reply to: *T Bennett
    Version 1.2 is added. See commentary here: http://poleshchuk.spb.ru/cad/2009/tainypod12e.htm
    Nikolay Poleshchuk
    http://poleshchuk.spb.ru/cad/eng.html
    Please use plain text.
    *T Bennett

    Re: You gotta try visibility-add-eng-v1.1

    07-31-2009 05:11 AM in reply to: *T Bennett
    Cool, I'll try it when I get a chance.


    wrote in message news:6225878@discussion.autodesk.com...
    Version 1.2 is added. See commentary here:
    http://poleshchuk.spb.ru/cad/2009/tainypod12e.htm
    Please use plain text.
    New Member
    Posts: 1
    Registered: ‎07-29-2009

    Re: You gotta try visibility-add-eng-v1.1

    07-31-2009 10:57 AM in reply to: *T Bennett
    Hello,

    This is what I was looking for!

    well, I have some doubts. still cannot make this work.

    after I add a visibility with visibility_add, what should I do?

    if I try to use the visibility up, I can not select the visibility parameter that I added before.

    if I try to add another parameter visibility, the program returns error.

    what am I doing wrong?

    I sending the file that I'm working. I want select what the elements in the legend I want.

    Sorry for the errors, I'm brazilian and I don't speak english very well. Google Translate help me #) Edited by: rafa.fiss on Jul 31, 2009 5:58 PM
    Please use plain text.
    Valued Contributor
    Posts: 57
    Registered: ‎06-27-2006

    Re: You gotta try visibility-add-eng-v1.1

    08-01-2009 01:20 AM in reply to: *T Bennett
    AutoCAD sees only one visibilty parameter in the Block Editor while editing its visibility states. This parameter is at the top of an internal vis-parameters list.
    So you cannot edit visibility parameter until it becames up on the top in the block definition. If you want to do something with a parameter you should first make it uppest (use visibility-up) and only then edit it. After that you can put another vis-parameter to the top (use visibility-up again but pick another parameter) and then edit it.
    And so on.
    Nikolay Poleshchuk
    http://poleshchuk.spb.ru/cad/eng.html
    Please use plain text.