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
21780 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 21 of 213
DashMonkey
in reply to: Anonymous

After a whole lot of frustration I've figured out why at some point in the construction of dynamic block, the (visibility_add) and (visibility-up) commands ceased to function. I narrowed it down to whether or not my block contains User Parameters or not.

If I try to execute the (visibility_add) command (for the 2nd time; there is already a VP in my drawing at this point) while a User Parameter exists in my drawing I get:

Command: (visibility_add)
Select point for placing Visibility Set:
** Visibility parameter already exists in block definition. **Unknown command "L". Press F1 for help.
Unknown command "VISIBILITY-1". Press F1 for help.
Command:

If I try to execute the (visibility-up) command while a User Parameter exists in my drawing I get:

Command: (visibility-up)
Select required Visibility Set:
Command:

However, once I remove the User Parameter and execute (visibility-up) on the VP already in my drawing, everything goes back to working as intended.

SUPER frustrating as it denies any possible use of User Parameters in conjunction with visibility-add-eng.
I'm using AutoCAD 2010 and visibility-add-eng-v1.3

-Karsten Loewen

p.s. - If you change ATTIPE to 1 and adjust the linespaceing for a multi-line attribute definition, fields will be converted into text and will no update when you insert the block or even when you test the block. Just FYI.

Message 22 of 213
NikolayPoleshchuk
in reply to: Anonymous

Now the reason of your difficulties is clear. In AutoCAD 2010 new properties table somewhat changed the internal structure of dynamic blocks.
So visibiliy-add-eng-v1.4 is published. Please check at http://www.private.peterlink.ru/poleshchuk/cad/2009/tainypod12e.htm
Good luck!

Nikolay Poleshchuk
http://poleshchuk.spb.ru/cad/eng.html
Nikolay Poleshchuk
http://poleshchuk.spb.ru/cad/eng.html
Message 23 of 213
Anonymous
in reply to: Anonymous

On 2/10/2010 9:43 AM, NikolayPoleshchuk wrote:
> Now the reason of your difficulties is clear. In AutoCAD 2010 new properties table somewhat changed the internal structure of dynamic blocks.
> So visibiliy-add-eng-v1.4 is published. Please check at http://www.private.peterlink.ru/poleshchuk/cad/2009/tainypod12e.htm
> Good luck!
>
> Nikolay Poleshchuk
> http://poleshchuk.spb.ru/cad/eng.html

The requested document
(http://www.private.peterlink.ru/poleshchuk/cad/Download/visibility-add-eng-v1.4.zip)
does not exist on this server.

??
--
Dave - DDP
Acad and Revit 2010 64 bit
Win 7 Pro
Intel I7-860 @2.8GHz
8GB DDR3 RAM
GeForce GTX260
Message 24 of 213
NikolayPoleshchuk
in reply to: Anonymous

Fixed
Nikolay Poleshchuk
http://poleshchuk.spb.ru/cad/eng.html
Message 25 of 213
Anonymous
in reply to: Anonymous

On 2/10/2010 9:56 PM, NikolayPoleshchuk wrote:
> Fixed

thanks!
--
Dave - DDP
Acad and Revit 2010 64 bit
Win 7 Pro
Intel I7-860 @2.8GHz
8GB DDR3 RAM
GeForce GTX260
Message 26 of 213
carlos.matioli
in reply to: Anonymous

Hi, i really enjoy your lisp, jbut i have a question. Can i make a visibility set desappear at one moment and appear in another? The case is: i chage 1 visibility set in the properties, but all the visibility sets are available to change, and i want to chose the visibility sets that the users will be available to choose according to the visibility set that i chosse. I want this with properties and the grip.

Is that possible?

ps.: sorry about the english, i'm trying to be as clear as possible.

Thanks
Message 27 of 213
NikolayPoleshchuk
in reply to: Anonymous

It is possible but only after writing new special programs.
Nikolay Poleshchuk
http://poleshchuk.spb.ru/cad/eng.html
Message 28 of 213
jmcbride
in reply to: Anonymous

I have been using with pretty impressive results in 2011.  It has its quirks and I have destroyed a few blocks and crashed a few times, but it does seem to do as promised if you plead with it and whisper in its ear.  I had to make sure EVERYTHING I wanted the block to do was already there and do the multiple visibiliteis at the very last part.  I added all visibilities at one time, then edited them one at a time, saving at every (visibility-up).  The one thing I would BEG for is the ablity to explde the block when you are finished changing parameters and have ALL the visibilties now available as non-block objects.  Right now, If you exlode the block, only the objects in the visibility you have set as "up" are left.  If someone has an idea how to do that it would be sweet!  Again, awsome job to Niko and all involved as this is high end stuff WAY past my knowledge base!  Autodesk will definetly be "rolling this lisp in" at some point as they have said that multiple visibilities is impossible.

Message 29 of 213
Charles_Shade
in reply to: jmcbride

I'm sure the author would accept cash donations and liscensing rights with royalties to provide the continued support and upgrades to the base program for Autodesk's vast cadre of users.

 

And while your at it make it work in LT also!    😉

Message 30 of 213

Thank you fellows for your kind words!

Nikolay Poleshchuk
http://poleshchuk.spb.ru/cad/eng.html
Message 31 of 213

Niko, any way to explode the blocks and retain visuals?

Message 32 of 213

No, visual states do not exist outside dynamic blocks.

 

Nikolay

Nikolay Poleshchuk
http://poleshchuk.spb.ru/cad/eng.html
Message 33 of 213

Let me rephrase.  Is it possible to set a block like you need it, then explode it and have whatever it was set at but exploded.  I.E. Take your example block OneBlock-MultipleVisPars!.dwg and set the block to Group1 - Obj1 and Group2 - Obj1 then explode it.  I would expect to have 1 circle and 1 square.  Is this still not possible?  I can NCOPY out of block before it is exploded ok, so just wondering if it is possible.

Message 34 of 213

Of course if you explode your dynamic block reference right now you will lose all the extra visibility states.

 

But there is an interesting observation by Andrey Lazebny.

If you launch REFEDIT command and select reference AutoCAD will tell you that it is going to create a static definition. Reply OK. After saving new block definition and closing REFEDIT (!) you will see block reference as earlier and can explode it.

So you will get what you want!Smiley Happy

Nikolay Poleshchuk
http://poleshchuk.spb.ru/cad/eng.html
Message 35 of 213

That worked perfect!!  I just need to make sure not to purge out the original block!  Thanks guys!  and again, very awsome programming.

Message 36 of 213
Thomas.l
in reply to: jmcbride

First of all I would like to apologize myself for the rudeness of my question

I am a student and my knowledge of AutoCAD is very limited.

 

A few weeks ago I started experimenting with the visibility features of AutoCAD and noticed the problems and restrictions of one visibility set. After some research I discovered the "mysteries of Autodesk’s caves". It was a punch in the face. As most people I was convinced I could handle my little problem in a matter of hours but this article showed how little I actually knew of AutoCAD. 

 

The next few days I studied everything I found concerning visibility-add and LISP but it wouldn’t help. To say it plain and simple: I don’t understand the basics of the program and wouldn’t know where to start looking for the explanation.

 

At this point I would prefer to follow some courses to at least try to understand the basics of these programs. But there comes the problem of time. I need the drawings for a project at school.

 

Therefore I humbly ask if there is somebody who can explain in a very simple way how I can use this nice piece of programming. Unless my interest in the hole concept my only goal is to make a drawing like the DWG file in the article.

 

I sincerely hope there is somebody who can help me with my problem and would like to complement you all with the work you have done on adjusting AutoCAD to everyone’s needs.

 

Thomas Leflere

Message 37 of 213

To understand the programs you need to know Visual LISP rather well. If you do not understand the mentioned programs using very deep knowledge of AutoCAD internal structure you may write to their author (A.Lazebny), email address is given at the "mysteries of Autodesk’s caves". I can answer some of your questions too because I took part in examining and publishing of the "mysteries" programs.

Nikolay Poleshchuk
http://poleshchuk.spb.ru/cad/eng.html
Message 38 of 213

That is exactly my problem. I don't understand Visual LISP at all. What I am asking for is way harder than understanding the program. I’m looking for a guideline so to say to use the visibility-add application without understanding the underlying programs. Starting from the block editor.

 

I know that it is not an easy task (and certainly not very defiantly). But I would be very grateful if somebody can help me with it.

 

Thomas leflere

Message 39 of 213
Charles_Shade
in reply to: Thomas.l

As was said ask and post your attempts here in this thread or in a new thread for guidance.

 

But I think several larger questions loom:

Why do you seek to do something that is outside of the core program?

Is this to impress your instructor?

Are you making your Dynamic Block far to complicated?

And you are using a full version of AutoCAD and not LT correct?

 

Message 40 of 213
Thomas.l
in reply to: Charles_Shade

First and foremost I would like to stress that impressing my teacher has nothing to do with it. If that was my goal I would have taken a complete other way with the project.

Further I would like to explain the project.

 

We are looking at the possibilities of AutoCAD to design residential ventilation installations.You buy ventilation pipes with standard lengths of 3m so we aren't speaking of very precise drawings. One of the last things you decide is the diameter of the tubes. This depends on the flow rate of the air. So my plan was to design a block with the possibility do change both length and diameter of the blocks. And this for tubes in 3D. This is why multiple visibility modes would be very handy.

 

But if this can’t be done with AutoCAD we probably we will look for other possibilities. If on the other hand it is possible in AutoCAD we can take the next step and bring in some guys who can work properly with the program. 

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

Post to forums  

”Boost

 

”Tips

 

”Services