OOTB Multiple Visibility States - SOLUTION!

OOTB Multiple Visibility States - SOLUTION!

Libbya
Mentor Mentor
76,063 Views
156 Replies
Message 1 of 157

OOTB Multiple Visibility States - SOLUTION!

Libbya
Mentor
Mentor

I have done a fair amount of thinking on how to create multiple visibility states without using the broken vis-add-eng LISP and have come up with a workaround solution!  Obviously, doing all the itterations for multiple visbility states is a bit cumbersome, but at least there IS a workaround.  See attached.

 

 

Accepted solutions (3)
76,064 Views
156 Replies
Replies (156)
Message 41 of 157

Anonymous
Not applicable

Since it was too difficult to make so much visibility states and select the right objects, I made subblocks with names that are related to the Lookup table. Then I created a Excel-file to create the script. The entities of the subblocks are on a layer that is off. When done it is easily to move all blocks to 0,0.

Just change the subblocks to show different objects.

I only created 27500 visibility states and easily changable.

 

Now an option to fill the Lookup Combo easily...

0 Likes
Message 42 of 157

Libbya
Mentor
Mentor

Wow, that's taking it to a whole new level.  If memory serves, Ojuris posted up a link to a LISP that converted excel to lookup.  The block you posted only seems to have one visibility state.  I'd like to see the finished block when you are done.

0 Likes
Message 43 of 157

Anonymous
Not applicable

What is wrong with this block? It is too slow and the combo lookup tables give every time errors: duplicate items. Only 5400 rows in both tables, 4 point variables.... 5400 visibilty states: 14, 2, 3, 4 and 5 and 4 options in the 5 lookups. Is there a limit?

AutoCAD 2016 freezes on my laptop, selecting  the block is barely impossible, changing states even more impossible.

Thsi is almost the same block I posted before, but build it up again. I only added Visibility States through a script, filled the combo Lookup tables by adding them in DXF. The Excel-to-Lookup lisp didn't work with AutoCAD 2016 and Excel 2007 (I changed the version in the lisp). The output to Excel worked.

0 Likes
Message 44 of 157

Libbya
Mentor
Mentor

I think you may have passed the useful limit of the number of visibility states or lookup table rows which is the reason for the terrible lag.  As far as the lookups working, you need to have the base position of the input parameters match the lookup table values of the row that corresponds to the default visibility state.  

 

I don't understand the function of your block.  If it is just text fields I believe you can do all of it without changing visibility states or any lag.  If you give an explanation I will try to assist further.

 

Here's your block back with input base locations corrected so it works albeit very slowly.

0 Likes
Message 45 of 157

Anonymous
Not applicable

i tested my orginal block with 2700 visibilty states (VS): AAAAA to OCCED, using a letter for the tables, filled by using a DXF-file the VS-combo with those and as values C0 to C2699. The combo table with values I filled with 3 rows: still too slow. 5400 VS no problem when it is the only block in the drawing.

Without the combo-Lookup it works still fast.

 

The VisAdd.lsp works still under Acad2016, at least the Add and Set of another the Visibility State. I created two commands to easily execute them. Only what not works is: the combination of different Lookups combined with the VS in ModelSpace, it sees only the last set one.

 

I might be easier to program with .NET or Lisp to read the values of the lookups and then set the right VS.

 

You will understand the function of the block now, if you move all blocks to 0,0 and turn on the objects layer, turn off the other two.

0 Likes
Message 46 of 157

Libbya
Mentor
Mentor

I turned on the object layer and will say that you can reduce the number of visibility states and double lookup rows.  Any time the difference is just text, you can make that change with using a single lookup and no visibility state change.  For example, that would make the last row of objects only 2 rather than 4.  You could use the 'scaling method' which scales the unwanted objects down to the smallest unit (leaves a dot) which does not require any permutations.

0 Likes
Message 47 of 157

Anonymous
Not applicable

Thanks for the suggestions, it worked for lookup C to E. The combination of lookups, visibility states and Combo Lookups are crappy programmed by AutoDesk, I thought it should work.

Giving every lookup it's own visibility state with some kind of groups would work: stay away of the rest of the objects.

 

Thiis is just a workaround, like we all do with programming. Hopefully the programming is added in the program itself: I was never asked (by programs using AutoCAD).

 

Strangely there is no VBA code to set the Properties of the dynamic block, getting it is no problem. Many companies hasn't .Net installed (VB.Net or C#.net).

0 Likes
Message 48 of 157

Anonymous
Not applicable

I just reply: does it works for you: No, this  is my anwer:

 

Read page 5 to see the hickups... Not workable,Autocad not responding while selection a single object (the only one in that drawing), Selection an option in a lookup: even worse....
All pages are just a workaround.... OOTB: Out of the Box, which means not programmed (workaround), asking to improve?

 

No answers of AutoDesk since I first answered? Improvements taken seriously? I guess not: not much change in the  dynamic blocks section since AutoCAD 2007, still to many workarounds? Other cases I still have no answer either....

0 Likes
Message 49 of 157

Charles_Shade
Mentor
Mentor

I think you have your answer from Autodesk and I doubt there will be any additional "features" provided in the future.

0 Likes
Message 50 of 157

Libbya
Mentor
Mentor

@Anonymous wrote:

I just reply: does it works for you: No, this  is my anwer:

 

Read page 5 to see the hickups... Not workable,Autocad not responding while selection a single object (the only one in that drawing), Selection an option in a lookup: even worse....
All pages are just a workaround.... OOTB: Out of the Box, which means not programmed (workaround), asking to improve?

 

No answers of AutoDesk since I first answered? Improvements taken seriously? I guess not: not much change in the  dynamic blocks section since AutoCAD 2007, still to many workarounds? Other cases I still have no answer either....


The process described in this thread works well within certain limitiations.  Attempting to use it for thousands of visibility states is outside the realm of what I have used it for.  I was interested to see your results and they are not really unexpected.

 

Did you try the scale method?  It does not require any visibility states and does not require a double lookup.  There would be no perceptible lag with your options.  The only downside is that it shrinks to a little dot and requires a parameter action per each item.  See attached.

0 Likes
Message 51 of 157

Anonymous
Not applicable

Thanks for your answer.

 

I have another problem with my multiple lookups: Some of the lookups maintain a strange default: Custom (4) or Converted (1).  With these set, the bridged lookup does not update until each seperate lookup has been changed at least once.  Then the bridged updates and the visual states shows the correct versions. When I delete the Custom the lookups cease to work. Any ideas?

0 Likes
Message 52 of 157

Libbya
Mentor
Mentor

The most likely reason is that the default state of the input positions does not match the default visibility states, but you'd have to post the block for me to know for sure or give a better answer.

0 Likes
Message 53 of 157

Anonymous
Not applicable

Good news: the visibility-add-eng.lsp is still working under AutoCAD 2016! At least for two Visibility States Parameters added by the Lisp.

I wrote a manual and created commands in this lisp, upgraded it to version 1.6. The commands and manual are printed on the command line when the lisp is loaded.

Cross posted here because Charles asked for it: http://forums.autodesk.com/t5/dynamic-blocks/multiple-visibility-lisp-routine/m-p/5872400/highlight/...

0 Likes
Message 54 of 157

Anonymous
Not applicable

I noticed the Multi Lookup table wasn't needed, it saves so much time.

 

Here are the new files: http://forums.autodesk.com/t5/dynamic-blocks/multiple-visibility-lisp-routine/m-p/5872911#M19195 page 2.

 

What if we combine visibility-add-eng_1_6.lsp with the Excel-Lookup.lsp, search for the DXF codes of the other parameters and use an Excel file like I just added: we can create parameters, rename, fill and update them. The headers have descriptions how I was thinking to uise the cell values.

0 Likes
Message 55 of 157

Anonymous
Not applicable

Attached is the block that I have difficulty with.  If I select any of the options on the screen, they work and change the individual option and the lookup table.  That is until I select the Consultant option, which defaults to custom.  From then on the visibility will not change and the other options will quit changing.

 

How do I get rid of Custom?

0 Likes
Message 56 of 157

Anonymous
Not applicable

Simple, just change the text custom to a another value in the lookup table, one that is used.

0 Likes
Message 57 of 157

Anonymous
Not applicable

With AutoCAD 2016 there is a little problem using lists with parameters: fractional values with many digits are rounded different in the lookup.

0 Likes
Message 58 of 157

cad
Explorer
Explorer

Thanks for sharing this great idea. I believe this is exactly what I have been after for months. 

 

I created a block by following your method with a little modification. Instead of using two ball objects I used a point with X and Y coordinates as inputs. However, it does not work properly. 

 

The problem is that the visibility state is always one state behind what I selected. In oder to get the right state I have to select the same parameter twice. It would be much appreciated if you could have a look at my block. It is almost driving me crazy.

 

Many thanks in advance.

0 Likes
Message 59 of 157

Libbya
Mentor
Mentor

It seems like it should work with the XY parameter the way you have it set up, but I believe that is the issue.  I changed it to just a point parameter and again used the X and Y positions on the two tables and it works fine.  Note that there is no need to add the move action and have it move anything.  I realized that after my initial post.  Here's a screencast of my fix on your block.

Message 60 of 157

cad
Explorer
Explorer

I changed to point parameter as you suggested and finally it is working. No idea why XY coordinates doesn't work but as long as I have a functional block I am happy. Thank you so much for the prompt response and the solution Smiley LOL

0 Likes