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
21770 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 81 of 213
rapidcad
in reply to: Spiritshifterus

Hey Chris, I had a look at your block this morning and I like what I see. I see a progression of thought from where you started as you have found the best way for you to access the different options for your block. It is more important to figure out the best way to present options rather than concern yourself with which technology will be used to do the drawing. Sometimes the best option is combining several grips into one like you did. The main thing is to focus on helping your users find things quickly and make as few choices as possible to get where they need to be.

 

One minor but useful tip can be given here though. I noticed that you are not using the description field on your parameters. Of course, the block works fine without them, but you are likely missing out on helping your users with information. If you run your settings with GRIPTIPS set to 1, you can read whatever is in the description field when you hover over any grip. It might not be important if everyone knows what your particular grip controls, but for me, I have dozens of complicated dynamic blocks, each with an average of 6 or 7 grips to figure out. you wouldn't want to pick each grip in order to actually see what it is that they control, that would be too time consuming. Mousing over the grips to read descriptions is a very professional way to communicate how to control your blocks.

 

Hope this helps - I'm glad you're getting this MVP working for you.

 

Ron

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

Dear Mr. Powell, I may not have been using Parameter Descriptions on my blocks, ... But I am now! That is very wise advice, and armed with that knowledge, I will spend my time today adding the appropriate data to my super-blocks! Thank you, sir, and have a good day, all. Chris Martin
Message 83 of 213
peter_m.
in reply to: Anonymous

I'm struggling to get this to work.

 

It's the visibility_add command that is causing me problems, the rest seem to be working just fine in blocks where others (on this forum) have already created multiple view states, however visibility_add never works no matter what.

 

I get an 'unknown command' error after the 'Fantom' view state is created. It then disappears and I'm prompted to load the lisp program again. Full dump is below.

 

 

 

Command: _appload visibility-add-eng.lsp successfully loaded.
visibility-add-eng.lsp successfully loaded.


Command:
Command:
Command:
Command: (visibility_add)
Select point for placing Visibility Set: tt
Specify temporary OTRACK point:


Select point for placing Visibility Set: _.point
Current point modes:  PDMODE=34  PDSIZE=6.000
Specify a point: 0,0,0
Command: _.BSAVE
Command: _.BParameter
Enter parameter type
[Alignment/Base/pOint/Linear/Polar/Xy/Rotation/Flip/Visibility/looKup]: _V
Specify parameter location or [Name/Label/Description/Palette]: _L
Enter visibility property label <Visibility1>: Fantom
Specify parameter location or [Name/Label/Description/Palette]:
Enter number of grips [0/1] <1>:
Command: _.BSAVE
Command: _.point
Current point modes:  PDMODE=34  PDSIZE=6.000
Specify a point: 0,0,0
Command: _.undo Current settings: Auto = On, Control = All, Combine = Yes,
Layer = Yes
Enter the number of operations to undo or [Auto/Control/BEgin/End/Mark/Back]
<1>: 5 (Lisp Expression) GROUP (Lisp Expression) GROUP (Lisp Expression) GROUP
(Lisp Expression) GROUP (Lisp Expression) GROUP Regenerating model.

Command:
Command: _.BSAVE
Command: _.point
Current point modes:  PDMODE=34  PDSIZE=6.000
Specify a point: 0,0,0
Command: _.BSAVE
Command: _.undo Current settings: Auto = On, Control = All, Combine = Yes,
Layer = Yes
Enter the number of operations to undo or [Auto/Control/BEgin/End/Mark/Back]
<1>: 1 (Lisp Expression) GROUP Regenerating model.

Command:
Command: _.BParameter
Enter parameter type
[Alignment/Base/pOint/Linear/Polar/Xy/Rotation/Flip/Visibility/looKup]: _V
** Visibility parameter already exists in block definition. **
Command: _L Unknown command "L".  Press F1 for help.

Command: Visibility: 7ffff949 Unknown command "VISIBILITY: 7FFFF949".  Press F1
for help.

Command:
Command: APPLOAD visibility-add-eng.lsp successfully loaded.


Command: _.point
Current point modes:  PDMODE=34  PDSIZE=6.000
Specify a point: 0,0,0

Command: _.point
Current point modes:  PDMODE=34  PDSIZE=6.000
Specify a point: 0,0,0

Command: nil

Command:
Command:
Command: _.BSAVE

Message 84 of 213
rapidcad
in reply to: peter_m.

Alright, first off, what version of AutoCAD and the LISP engine are you using?  And can you build your own MVP dyn block from scratch? Have you tried creating a simple block and visibility-adding one parameter, completing it, then adding a second? I can't say that I have much experience beyond version 1.3 of the program. I started my development with it, and since my project is a long term one, I have decided to stick with that version until the complete library is done (possibly another year). Perhaps there are issues with v1.4, I have only tested it a little.

 

Two things will easily corrupt a MVP dyn block.

1. A user parameter (the kind of parameter that a block properties table can generate from the menu at the top of the table).

2. Constraints within the block.

 

I found that I could add a block properties table to my MVP blocks, but I had to leave it empty until I had every visual parameter constructed and working. Then, once I had tested in the testing window, I could fill in the table, use the testing window again, and copy-paste the block out of the testing window into my master block drawing. That's my workaround for using block properties tables. I keep a version of the block with the empty table just for further development of the block. Actually, I keep many saved versions of my blocks so I can go back to a working version when something goes wrong. This program definitely messes with the undo loop, so you have to take precautions if you don't want to start from scratch all the time.

ADN CAD Developer/Operator
Message 85 of 213
peter_m.
in reply to: rapidcad

Using Acad Civil 3d 2012. We haven't upgraded to 2013 yet as IT haven't updated the data management software to be compatible with it. I can't install 2011 because of IT.

 

I'm using vis-add-eng-v1.5

 

I cannot build a MVP dyn block from scratch. Even a block with only only dumb geometry, no user parameters at all.

I cannot add a further VP to MVP dyn blocks, it returns the same error and all of the existing VP's are deleted.

 

Message 86 of 213
rapidcad
in reply to: peter_m.

Yeah, i see what you mean with v1.5 and 2012. I did a little more testing and I could not add a visibiity at all in 2012. After reviewnig the threads from the time of publishing, I see that everyone has experienced the same problem with it. Sorry, but I think v1.3 is the best you can hope for and I think you need to use AutoCAD 2011 I tried using 1.3 and 1.4 in 2012 and I could not add the second visibility state without getting an error ... "The following error has occured, bad DXF group: (360)". 

 

Looks like it is 2011 or nothing right now unless Andre works some more magic...

ADN CAD Developer/Operator
Message 87 of 213
peter_m.
in reply to: rapidcad

Yes. Grrr.

 

Could I ask a big favour of someone?

A default block, just a colection of squares/circles

With 4 mvp states in, that I could use as a default start for future blocks.

Until the lisp is updated.

Message 88 of 213
nacirpl
in reply to: rapidcad

Just don't understand why Autodesk doesn't want to chip into this problem or feature (whichever you want to call it).

 

Sometimes I think they're only adding what they think is good for them at that point and not for those who use it (CLIENT). 

 

I remeber threads on forums asking for the feature that Andre created back in 2007, and Autodesk is sitting quiet.

 

Ehhh

Message 89 of 213
peter_m.
in reply to: rapidcad

I think it's now a 'Not Invented Here' problem.

 

At first they didn't think it would be necessary, then that they didn't know how to implement it, then soomeon outside went ahead and did it. After that, dev's won't touch it.

Message 90 of 213
nacirpl
in reply to: peter_m.

So at least they should go the path of Andre and create it in their own liking.

 

There's a lot of ppl that don't use the Dynamic Blocks, but once you start building them you would want to add a second VS becuase it's the esiest way any person thinks. Once they notice they can't it's like a hammer in the head.

 

Who cares that Autodesk did not invented this feature. Can't they realize that this is VERY IMPORTANT to their library ?

Message 91 of 213
Charles_Shade
in reply to: nacirpl

And one would presume the Authors pocket book as well.

Probably would need to negotiate the royalties first.

Message 92 of 213
peter_m.
in reply to: Anonymous

Hopefully that wouldn't be an issue.

 

Hopefully 1.6 will be out soon and I'll be able to insert MVP's, or ADesk wil pull their thumb out.

 

Until then, could I beg a simple block, just a bit of random geometry and 4 MVP's?

Message 93 of 213
peter_m.
in reply to: peter_m.

I'm still playing with my test blocks, I think I understand more of this. One question though.

 

Where have my Grips gone?!!!

Message 94 of 213
Spiritshifterus
in reply to: peter_m.

Dear peter_m,

 

I saved and opened your file, and upon selecting your block, I saw three grips underneath your left section mark. What do you say is missing?

 

Chris Martin

Message 95 of 213
Spiritshifterus
in reply to: Anonymous

Greetings again, everyone.

 

Throughout this and other threads, it has been recommended that it is best to create all of your elements first if one is going to try to use multiple visibility states. Wise point, as I have the experience of learning. But now, I would like to build upon that by asking another question.

 

Where should all of the elements be created in the Block?

 

I have been using combinations of multiple visibility states, Lookup Actions, and Block Property tables (BPT's, I call them) to create my blocks with great success. But I am concerned somewhat that when my block is complete, and I go to Insert > Block, the default state of the block is in a custom state. The default insertion choice of the block is not one of the choices that is on my table pull-downs. Admittedly, that may be a safety feature, to alert the CADDer that the block's appropriate state must be chosen. But still, I just feel turned off by seeing a state of something that I should not ever see.

 

I get the feeling that this may be because I create my blocks with elements at their farthest-out positions, and my moving/stretching parameters are drawn to those extreme points. Should I be creating elements at their default positions? Doing this, it looks as though as my blocks are being created, that I'll have elements that will overlap. I also see that a data row in the tables like one that I create cannot be chosen as the default insertion state of the block.

 

Anyone care to share their experiences? Thanks to all, again.

 

Chris Martin

Message 96 of 213
peter_m.
in reply to: Charles_Shade

I put some dynamic controls in there as well; rotates, stretches, etc.

This is a new problem for me. I haven't had them not display in a MVP before, and I've no idea why they aren't now.

 

Message 97 of 213
Spiritshifterus
in reply to: peter_m.

Dear peter_m,

 

I took a second look at your block this morning, and I believe I found your problem. As I switch from one visibility parameter to another (using Visibility-Up), I see that the rotation and stretch parameters & grips are invisible in all of your states. Here is a way I found to fix that (other board members may be even more correct than I on this, but here goes):

 

1) Switch your active visibility parameter from "Default" to another using Visibility-up.

2) Type in BVSHOW.

3) Select the darkened (currently invisible) parameters and grips.

4) At the next prompt which asks if you want items shown in current or all views, type "A" to choose all views.

5) Repeat steps 1-4 with your other visibility parameters, to make sure all of your dynamic controls are visible at all times.

 

Give that a try, and good luck.

 

Chris Martin

Message 98 of 213
peter_m.
in reply to: Charles_Shade

Aye I've just done that, and it's worked, so thank you.

But (I  hate beginning a sentence with that word), there's one set of grips that are only supposed to show in 1 vis state, and they still never show. I tried BVSHOW - Current, but nada.

 

However, I've also just noticed that the Vis states are affecting each other, they're not supposed to.
 So I might just give up. If I can't get even this simple little test block working how am I ever going to get my grander plans and projects to! /Frustration!

Message 99 of 213
rapidcad
in reply to: peter_m.

If you want a grip to be part of any visibility set the key is to select the parameter (name) of the grip when you are adding to your visibility set, not the grip triangle itself, (just in case you did not know). I remember that it took me a number of tries to figure that one out.

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

Dear peter_m,

 

I am glad that I was able to help you in this instance. But believe me, in spite of the things I've learned on this board and my own experimentations, I still have troubles with some blocks & their parameters. And, I don't just mean with multiple visibilities. I also still have loads of trouble with linear parameters and moving/stretching objects.

 

Bottom line: Please don't give up. This is something worth learning, even with the frustration. And the thing above all that this board has taught me, is that there are good people here willing to help.

 

Chris Martin

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

Post to forums  

”Boost

 

”Tips

 

”Services