Community
Dynamic Blocks Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

212 REPLIES 212
SOLVED
Reply
Message 1 of 213
Anonymous
22031 Views, 212 Replies

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

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
212 REPLIES 212
Message 101 of 213
Spiritshifterus
in reply to: rapidcad

Good day, boardmembers.

 

A few weeks ago, Mr. Ronald Powell (member ID rapidcad) posted a message, telling me and others here of the GRIPTIPS variable and using the Parameter Description fields. I've been following his advice, but I've noticed one slight problem. I have been using Block Property Tables in some of my blocks, and in those cases I am unable to see the description of the Table when I mouse over the table's grip. All other parameters work perfectly fine.

 

Is a Block Property Table's grip data handled by a different AutoCAD variable?

 

Thanks for your time.

 

Chris Martin

Message 102 of 213
rapidcad
in reply to: Spiritshifterus

If anyone else knows of a way to cause a block property table grip description to display please let us know. Sorry, Chris, but I also have the same problem. I have users ask me "How come this one grip doesn't have a description? - Did you forget to put it in?" even though I have a very good description in the block.

 

I believe it is a bug. I would really like to find out that there is a variable somewhere to turn this on, but I really doubt that there is.

 

BTW, you can just call me Ron!

 

ADN CAD Developer/Operator
Message 103 of 213
Charles_Shade
in reply to: rapidcad

That's an excellent point about choosing the Paramter and not just a part of it.

The easiest place to illustrate that is the Flip Parameter - This is the only Parameter where the worrds are just alone in space. (Flip State is not attached to the Parameter in the same way Distance is attached to a Linear Parameter.)

If you choose the words Flip State that Parameter (usually a line through the center of the flip will show) in the Vis State and you also need to choose the Flip Action if you want that available as well.

Other Actions and Parameters will behav ethe same way in that you have to choose each.

Message 104 of 213
peter_m.
in reply to: Spiritshifterus

Hey! I'm not THAT big an idiot.

I did already have the parameter and not just the grips selected to be shown. However, by switching to a different visibility and doing BVSHOW and selecting the problem parameter it did then work properly.

 

I still have the problem with Sect_ID and Breakline overrulling each other, which I have no idea why that happens, I swear it didn't when I first created it, but having saved, closed and re-opened the block it now does. And element-sel-current-del seems to do nothing.

 

I'm not throough just yet, probably to much of a masochist to give up.

 

So, question:

 

How do I stop one visibility parameter overiding the visibility state of another?

Message 105 of 213
rapidcad
in reply to: peter_m.

If you'll post the problem block I might be able to have a look at it. I have been able to solve some sticky issues with these by using a few tricks I've discovered the long hard way.

ADN CAD Developer/Operator
Message 106 of 213
Spiritshifterus
in reply to: peter_m.

Dear peter_m,

 

First of all, I apologize if I upset you in any way. That was not my intention.

 

Secondly, I too another look at your section mark block (of which, I'm actually very impressed with it). I went through with Visibility-Up and Element-Sel-Current-Del commands to assure the elements were sorted out. I have found that after doing the Element-Sel-Current-Del, another Visibility-Up tends to confirm that elements were removed from the particular visibility parameter, especially if your BVMODE variable is set to 1.

 

For your Section Mark block, I sorted the elements accordingly (with Element-Sel-Current-Del):

Sect_ID: your SectionMark-RL and -LL blocks, and the texts above them

Sect_Location: only your SectionMark-RD and -LD elements

BreakLine: just the 3 lines in between the -RL and -LL blocks

 

All parameters & grips are present in these three Visibility Parameters. For the point of this conversation, I ignored the Default visibility parameter. In fact, I deleted it from my copy of your file.

 

I have to admit, though, that I do not understand how your breakline elements are supposed to work when displayed. However, I think that I was at least able to prevent the overruling matter.

 

Again, just trying to help.

 

Chris Martin

Message 107 of 213
peter_m.
in reply to: Spiritshifterus

Oh don't mind me, I was being facetious. I wasn't at all offended.

 

So it seems we can add element-sel-curren-del to the list of commands that don't work with 2012 and up...

*sigh*

 

Although you do have the sorting right.

 

It is encouraging that the problems I seem to be banging my head against most are out of my control, rather than dim-wittery.

Message 108 of 213
mc-lemons
in reply to: peter_m.

Hi all,

 

Just stumbled across this little gem of a lisp as I just I came upon my first block that needed multiple visibility parameters (and was surprised to find that ACAD didn't have this already built-in! maybe i shouldn't be surprised...). I struggled through using it, but eventually found that if I followed rapidcad's detailed instructions from page 6 (near the bottom) that I could get the block to work as I had envisioned. 3 drop downs: 1 that's a regular visability parameter, and the other 2 for lookup tables that each include a separate visibility parameter. So i have a total of 3 visibility parameters.

Here's my problem:

If I copy the block to the clipboard and then paste it either in the same drawing or a different one, objects that were orignally set to be hidden become visible and the mtext in my attributes loses it formatting.

 

I have attached the block. I was wondering if someone could take a look at it and figure out why it's doing that. When it only have one visibility parameter (just the one at the top right), i could copy it without any issues. Once this block is all loaded up with sheetset fields, it is so much easier to copy and paste to each new drawing so I am really hoping it can be fixed.

 

Note: Even though I said I have 3 visibility paramters, you'll actually see that I have 4. The forth one doesn't do anything, its just a placeholder. But I found that if i used the (visibility-up) command to go back to one of the 3 parameters I already had set up, all other linework that was not part of the visibility paramter would dissappear, and I could not get it to come back. So I found a work around by creating a placeholder visibility parameter. I would use (visibility_add), but then not do anything to it once I placed it. Then if I ran (visibility-up) on one of the 3 other parameters to make a change (which would make everything else disappear), I could then run (visibility-up) again once I was finished, select the placeholder visibility parameter, and all line work would appear again.

 

Also note that I have a dynamic block within a block for the Logo at the top right.

 

I'm using  visibility-add-eng-v1.4 and ACAD 2010.

 

I'm hoping that someone could take a look. I would appreciate any suggestions.

 

Thanks for looking!

Message 109 of 213
Charles_Shade
in reply to: mc-lemons

Page 6 is irrelevant since that depends on how many threads per page you have set up to show.

Was it the numbered sequence thread that rapidcad posted (1-8 I think I saw?)

Let me know so I can mark it please.

Message 110 of 213
rapidcad
in reply to: Charles_Shade

Wow! Nice thinking on the title border MC. I love it. Great usage of the MVP tool to create a single border to handle a number of offices. I looked at what you are saying happens and yes, I can see an issue. I have a nice looking block if I paste into model space, but if I paste into a layout, I also got the hidden and unformatted text issues to show.

 

Hmm, but as I began to play with it, I seem to have it working better. My theory is that you should paste the block into a layout and edit the block  (loading the MVP lisp), maybe not even changing anything, just set one of the visibilities as current, then back to the intended default. Then do whatever you do to save the block and test it in a paste situation. I tried doing my own method of using the test window and copying to the clipboard from there, but all I get when I do that is your nested block for some reason. We'll have to mess with this some but I bet you can get it perfect if you keep at it.

 

I'm attaching what appears to be a fine functioning block  -try it - I didn't do anything more than I described above, but it seems fine now..

 

BTW Charles, he was probably referring to reply #59 in this thread.

 

HTH,

Ron

ADN CAD Developer/Operator
Message 111 of 213
Charles_Shade
in reply to: rapidcad

Thanks - That is the one I thought

Message 112 of 213
mc-lemons
in reply to: Charles_Shade

Yes, reply #59 is the one I was refereing to. I'm sorry for the confusion. I didn't realize that the number of posts per page could be individually configured!

 

Ron,

I can't say that I can explain what happened, but it is now working. I downloaded your block and inserted it into a new layout. I copied it (crtl+c) and then pasted it (ctrl+v) and it did not work. The green formated text was gone and all objects were visible again. So like you suggested, I messed with some things, and then I got it working! But the strange thing to me is that once I got it working, other versions of the block that I hadn't messed around with started working as well. For instance, I messed around with the one you sent me, but once I got that working, the one I had in the block library worked as well! Oh well, I'm just glad it works.

 

I hope that this isn't something that works sometimes but not others. Cause once I add this to the company block library, I like to know that it will be dependable or i'll be hearing it from eveybody about how it keeps screwing up and that i'm "wasting time by overcomplicating things" (which I hear from people who are too scared to learn how to use dynamic blocks).

 

Thanks for suggestion and taking the time to fool around with the block. Much appreciated!

Message 113 of 213
rapidcad
in reply to: mc-lemons

Hmm, weird that it seems to be off again, on again. Let me ask one more time about the only thing I think could be an issue. Are you saying that my block didn't work pasting from layout to layout?  I can imagine that you might run into an issue going from model space to a layout, not that that has to be an issue, but I can imagine one coming in that scenario.

 

One more reason that your block might act weird (my view from my limited experience) is that attributes do not act exactly like other block entities. For instance, try redefining a block with attributes and you'll find that the attribute info doesn't change globally (if my memory serves me right). I also think position of attributes is handled more on a block by block basis (again, memory?)  These anomalies might do a person in who is swapping attributes in and out from different visual parameters. I have not tried hiding differing sets of attributes yet with the MVP program which you are doing heavily.

 

Anyway, I sure am glad that you could get it going by repeating my steps.  Glad I could help. And also, I would recommend a Robert Green approach if possible. He would have you roll this out on a small group of users doing just a few projects first and see if they run into bad behavior before you go company-wide with it.

 

Again -I liked seeing this idea!  Let us know if it really is dependable - I'll want to try it next time I get to redo a border.

 

Ron

ADN CAD Developer/Operator
Message 114 of 213
mc-lemons
in reply to: rapidcad

So far, so good. I haven't used it a lot yet, but it seems to work for me and others without any problems yet. If issues crop up, I'll be sure to let you guys know. Thanks again for all the help!
Message 115 of 213
Spiritshifterus
in reply to: Anonymous

Hello again, board members, and happy holidays.

 

Would any of you please help me with a Visibility Parameter problem? I have attached my newest block below, the header for an Electrical Panelboard Schedule. I am using Version 1.4 of Visibility_Add_Eng on AutoCAD 2010, and everything that is white is constant from state to state of the block.

 

However, I am dealing with a glitch that I can't seem to get rid of. I need the 4 visibility parameters {Phases (cyan elements), Main Type (red elements), Neutral Bar (green elements), and Ground Bar (magenta elements)}. There is some issue where I cannot get the proper default state of the header to display when I insert the block without forcing a change (which makes it anonymous and increases the file size).

 

The Default State that I need to create is as follows: Phases = "3-Pole", Main Type = "Main Circuit Breaker", Neutral Bar = "Yes", Ground Bar = "Yes".

 

Any ideas why this is not working for me? I've been able to perform this task before on other blocks I've created (admittedly, thanks to the help of the boardmembers here).

 

Chris Martin

Message 116 of 213
rapidcad
in reply to: Spiritshifterus

Merry Christmas!

 

See if this works for you Chris...

 

I added an ALL_ON/Default state and set Default on top and current. Then I turned the grip off so no one can see it. I left the property on in the property palette in case you need to force it on via tool palette insertion. That would be more of a brute-force method if nothing else worked. You can just highlight the VP_ALL_ON parameter and right-click for properties.

 

The last category on the bottom is Misc - if you set "Show Properties" to "No" you won't see it in the properties palette if you highlight the block after insertion.

 

Hope that helps and have a great weekend. I have to drive the carpool home now so I might not check on this until Monday (unless I think about it tonight!)

 

ADN CAD Developer/Operator
Message 117 of 213
Spiritshifterus
in reply to: rapidcad

Dear Mr. Powell,

 

I saw your VP_All_On parameter, and it does solve my problem. But I have a hard time understanding why this default parameter is necessary (no offense to you, of course).

 

There are three Multiple Visibility Parameters (MVPs) located above the chart, which simply turn on and off aspects of the chart. I am able to create my chart block with just those three MVPs, and the block is inserted perfectly (Neutral Bar on, Ground Bar on, Main Breaker on/M.L.O. off). Those three MVP's also have so few elements to visually manipulate; all of the rest of the chart elements have been Element-Sel-Current-Delete'd.

 

My problems come from when I create the fourth, and most important, MVP (which I call "Poles"). This parameter affects the full display of the chart itself, and must be incorporated into a Block Properties Table. The majority of the grid lines, as well as all of the titles, will remain visible at all times. The fourth MVP affects the appearance of some column headings. I don't see why my fourth MVP can't perform the same function as your VP_All_On parameter. Why can't I get by with just four Parameters?

 

Thank you.

 

Chris Martin

Message 118 of 213
rapidcad
in reply to: Spiritshifterus

Hey Chris, (you can call me Ron) I think the issue has to do with how AutoCAD handles any dynamic block parameter. We create all these parameters and they all have to have some default value, whether it is a linear, or a lookup or a flip or whatever. When we insert a dynamic block, those defaults are drawn per the length, or visibility or rotation or flip that is the set value that you left them in your last edit, or the top of a list when it comes to lookups or visibility states.

 

When we mess with AutoCAD's data structure and add multiple visibility states, we end up leaving one current when we are through because one always has to be current. The one we leave current needs to have as a visibility set everything that could get turned off (I use the ALL selection set and grab everything). Then it needs to have the default entities turned on so that you can leave the block ready for insertion with the exact look that you want. I really like to set up this visibility parameter first so I can always display any entity during my further editing. The I can have more control as I add each subsequent visibility parameter. The key to remember is to set the default visibility parameter as current when you are through editing.

 

If you are not going to do this, even if you have each individual visibility state set correctly, the fact that the last one that was set current does not contain all the entities causes the other "neighbor" visibility sets to struggle to set their own defaults correctly, probably because Autodesk didn't program the data to sort correctly since they don't have anything to do with this.

 

By setting up a default visual parameter, you effectively create a "parent/child" situation instead of a "neighbor" situation for every entity that gets hidden in the drawing.

 

I also encourage the use of this method because when you delete a visual parameter, it is possible to strand some entities in a kind of no-man's land since their visibility got deleted. They do still exist and have entity handles and all, you just can't see them unless you attempt to add them to a different visibility set. I like to try to keep these blocks as clean as possible since they are usually library blocks which end up in a drawing dozens of times or more.

 

Does that explain?

ADN CAD Developer/Operator
Message 119 of 213
Spiritshifterus
in reply to: rapidcad

Dear Ron, thank you for your explanation. It took a while, but the extra default MVP (which I'll call Master in future applications) did the trick as you showed me. (bowing to your superior intellect)

 

Have a good day.

 

Chris Martin

Message 120 of 213
rapidcad
in reply to: Spiritshifterus

Glad it worked for you Chris - maybe others can benefit from the example too. BTW, Don't confuse my longer experience with MVP's with "superior intellect". The Roman's had a saying, "Experience is the teacher of fools".  (Better to learn form others than have to figure it all out yourself). Guess I'm a fool - but I'm a happy one!Smiley Happy

ADN CAD Developer/Operator

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

”Boost

 

”Tips

 

”Services