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
22034 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 201 of 213
DBdJ1
in reply to: rapidcad

I just took version 1.5 of the lisp and added commando's to start the function, then I added the function tree and manual. More I didn't do to the lisp.

I'm not going to paste code in the command line if a command is easily made.

Only Visadd and Visselect seems to work.

 

The visibility states parameters I added last, not tested other sequences. I changed the tables later too. If I changed a visibility state of the first added with the lisp, I had to repaste the entities belonging to the second one and delete the visibility states and make them again. Of course I took the same name.

Message 202 of 213
rapidcad
in reply to: DBdJ1

Thanks. I did the same several years ago by creating simple 2, 3 or 4 letter command calls for the functions in my copy because I do this all day, sometimes for weeks at a time. I also wrote a little "Block Authoring Tool Palette" tool to load the program while I'm in the block editor. I've always stayed with developing in AutoCAD 2011 because I have to create blocks for a good number of distributors who use all flavors of AutoCAD 2010 or newer, so I have to have working blocks in the 2010 file format, which when adding this level of hacking, just might not work if developed in 2016, and saved back to 2010 file format. I have all the newer versions installed and test with them.

 

It would be nice to have some of the newer features available while I do development, but I can get by. I really wish the program was fully functioning after creating user parameters. I often have to empty block property tables and delete user parameters to edit my finished blocks, then rebuild when done.

 

Thanks again - even though it isn't functioning enough for me to use yet, I appreciate the way it keeps our hope alive for getting this functionality working someday. Smiley Happy

ADN CAD Developer/Operator
Message 203 of 213
DBdJ1
in reply to: rapidcad

Or just use versions 2013 to 2016: same 2013-format, so the DXF-file should be the same too: opening it and having the same functionality, the rest added by the Autodesk afterwards.

 

I did some compare between a 2013 DXF-file without the added VSP by the lisp and with it. I needed to create the standard VSP for that.

Here are my conclusions so far, I just wanted to see the impact of code of an added VSP.

See attached XLSX-file (in Column C: FOUT = not the same value):

For the other functions to work again we just need to look for the difference between a 2010- and a 2013-DXF file, the object section. Other sections having some difference (except savedate, limits, etc). The Classes Section: Adding a visibility parameter adds just one to the key 91 in the Visibility Parameter.1 or 2 to the grips.

Object section, I divided but not compared yet: Dynamic Block Parameters, Xrecords and Dictionaries and maybe some other objects.

Here are the difference between an added an not added VSP. Values (not keys) beginning with C and  having 4 characters are mostly a handle. First key, next line is value. All sections/objects/etc are starting with a 0, so it was easily been separated.

 

Sometimes the Column C is hidden, formulas not corrected. Just copy a working one.

Message 204 of 213
DBdJ1
in reply to: DBdJ1

As you can see, the sequence of writing an DXF-file is different so AutoDesk splits up its code in the object section and writes it whenever an item is found to the file.

Other sections have the same sequence.

Even when you use the same file, delete a VSP and save it as another file. I did no movement of code, just splitted it up in worksheets.

Message 205 of 213
rapidcad
in reply to: DBdJ1

That's good to know. I am not very good at programming, but I've been able to come up with some pretty advanced stuff by tinkering with other's masterworks before, but at the moment, I can't dedicate the time to explore this with you - I have too many deadlines for a while. This looks like quite a bit of work. Wish I could dig in, but I can't for now.

 

Ron

ADN CAD Developer/Operator
Message 206 of 213
ugoveri
in reply to: rapidcad

Ronald, I know this post is old, but can you tell me if your Autocad 2011 installation is 32bits or 64bits? I tried to install the Autocad 2011 64bits on Windows 10 with the latest service pack to follow your system setup and still couldn't make visibility-add-eng-v1.3 work. Basically the commands don't work after loading visibility-add-eng-v1.3. Can you give some guidance on that? Best regards,
Message 207 of 213
rapidcad
in reply to: ugoveri

Hi, I am using AutoCAD 2011, 64 bit, but the bit will not matter unless the program is written in .net, or maybe some .arx might be like that, but I believe the program is pure lisp. So, can you get AutoCAD 2011 to open on Windows 10? I was under the impression that it was not possible to install it on Win10 due to the changes in the OS, and Autodesk was not going to support any efforts to make it compatible. I have looked into Longbow software because they make some kind of bridging software to make it compatible, but as of yet, I was unaware that they had the Win10-AutoCAD 2011 program working.

 

Can you run any other lisp? I don't know how much of this you know about, but let me ask a few basic questions just to see if you are on the right track. So, you have 2011 up and running...

 

Can you insert a simple (non-dynamic) lock to test with?

 

If so, you know to load the engine lisp within the block editor, right? You might have to spell the path out longhand if it won't allow the dialog box in the block editor, but I have forgotten details about that since I made a tool on my block authoring tool palettes to load the lisp, so I never load it manually anymore.

 

When you load the lisp, you should be able to type (visibility_add) and hit return and the program should prompt you like this:

Select point for placing Visibility Set:

 

You should be able to select a point and the program should add the visibility parameter. I know that I suggested that everyone use my simple call functions to load his functions since they become a pain to type in all the time, but I think you should test and see if the program works just the way the author wrote it. I am having you test this just to see if the program will load and execute any functions, so just try a non-modified version, load it in a new drawing, load a non-dynamic block, and load the lisp, then type (visibility_add) at the command line. If that does not come up with the prompt to "Select point for placing Visibility Set:", then something isn't working right. 

 

Let me know if any lisp program works for you yet.

 

HTH Ron

ADN CAD Developer/Operator
Message 208 of 213
ugoveri
in reply to: Anonymous

Hi there Ron,

After seetting your easier commands within the lisp I was able to have the lisp working.

Withou your commands it simply doesn't detect the original functions.

I was able to install Autocad from v2010 to 2016 on Windows 10.

After trying your "trick" everything worked as it should.

I was finally able to make a block with multiple visibility.

The version 1.6 and 1.61 for 2016 isn't working very well I guess. At least compared to this version. You can add the visibility sets but you can't use the remove and add objects from the visibility sets. So your visibility states end by being a bit crippled.

I tryed the 1.5 version that somebody mentioned worked on v2012 and that one aparently didn't work on 2011.

Best regards,

Hugo Verissimo
Message 209 of 213
rapidcad
in reply to: ugoveri

Thanks so much for the info Hugo! Glad that you got it going. Let us know if we can help figure out anything as you go along. Sometimes things have to be coerced into working, but we have figured out a lot of tricks. About your Windows 10 AutoCAD 2011, did you have to do anything special to install it? Does  everything work well?

 

Thanks in advance - it's good to hear that 2011 can be installed on Win10. I might pull the trigger, but it will take some time to find enough time to dedicate to doing a complete overhaul to my Win7 machine.

ADN CAD Developer/Operator
Message 210 of 213
ugoveri
in reply to: rapidcad

Hi Ron, I did nothing special to install Autocad 2010, 2011 or 2014 on Windows 10. But to be honest, I was kind of naif to install Windows 10 on a not so young machine. I have several problems in my Windows installation mainly related with graphic card drivers, specially the awake after sleep/hibernate and windows start is anoyngly slow. Then everything works well. But my suggestion is that unless you have a very recent machine (that for example was prepared for windows 😎 don't upgrade for now. I will send some of the blocks I prepared with multilpe visibility. This functionality is awesome. It opens several more possibilities when thinking of designing a dynamic block. Eventually I will use this forums to ask for guidance on some dynamic blocks manipulation that I am not being able to perform. Thank you for your time Ron. Best regards,
Message 211 of 213
rapidcad
in reply to: ugoveri

Thanks for the OS info, Hugo. I think my Win7 Workstation can handle Win10 when I have the time and courage to take on the project. It is a decent speed Quad Core i7 (I think 2.7Ghz, but I'm not in front of it right now) with 6Gb ram and an nVidia GT220, IIRC. I'll probably up the RAM and the videocard has caused trouble at times so I'll probably replace that, but I love the rest of it and the price to replace it would still be more, so I'll keep it for now.

ADN CAD Developer/Operator
Message 212 of 213
dayanandakumar.g
in reply to: Anonymous

Dear Sir,

 

After Loading visibility-add-eng.1.6,  VSPADDSEL & VSPDELSEL are not working in autocad13, when i select object after the command vspaddsel,

the object is not selected, please let me know what may the issue.

 

Please give the steps to use visibility-add-eng clearly, it will be a great help.

 

Regards,

Daya

Message 213 of 213
rapidcad
in reply to: dayanandakumar.g

Hi Daya. I have issues as well trying any version of visibility_add_engine in AutoCAD newer than 2011 (although I have not tested recently with AutoCAD 2012.) I use AutoCAD 2011 to develop blocks in, and I can use visibility_add_engine_1_4 to do everything, but once I add a few visibilities, I like to switch to visibility_add_engine_1_6 because I can still use it even when a block properties table containing user parameters is inserted, which 1_4 cannot process.

 

I usually start the block and load 1_4, create a master visibility which will have two states - DEFAULT and ALL ON. I set all the things I would want off by default to not display in the DEFAULT visibility. The master visibility set contains all objects. I create this so that I can still find anything that gets removed from a visibility state later.

 

With the DEFAULT visibility set to current, I add a new visibility property and rename it whatever it needs to be, then I set it current. Then I add visibility states. At this point I remove everything from the visibility state by choosing ALL as my removal set, but before I hit enter, I type "R" to remove objects I wish to control with this visibility parameter from the removal set. What I end up with is a visibility object set containing only the objects controlled by that visibility parameter. Once I finish coordinating the object visibility (visible or invisible) with the various states, I set the state that I want to default to at the top of the list and set it current and close the dialog box. Then I make my default visibility parameter active again and I'm ready to add another visibility parameter for another group of objects.

 

If ever I run into problems with developing a block, it helps to use the test window, highlight the block, and copy+paste the block into a new drawing tab and launch the block editor in that new drawing. I'll have to load whichever version of visibility_add_engine in that block window (I almost always switch at this point to v1.6) and set my default visibility to current and continue adding visibilities, defining the sets and setting their defaults. I always set my default visibility current when I'm through with the block, then hide the grip for it - it only exists for finding things in the mess of various visibility sets (things can get lost).

 

I have not been able to figure out how to get v1.6 to add visibilities correctly in AutoCAD 2012 and above, but the blocks I create in 2011 work correctly in all AutoCAD up to 2018 as well. What fails while using v1.6 in newer AutoCAD is that each new visibility set of objects seems to fail to isolate control of the previous visibility set's objects and lumps them all together, leaving you grips that do turn on the things that you want to turn on, but they also turn on other things that should have been left off (which are intended to be controlled by other visibility grips).

This is not an issue in 2011 though, so I keep using 2011 to develop in.

 

HTH

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