Jump to content
sketch11

Dynamic block - Lookup table for visibility states - not working

Recommended Posts

sketch11

Can someone please do a check on why the lookup tables are not working.

I have 2 states in there at the moment. 1 arrow and 2 arrows.

But when I test using the grips , it doesn't work.

Snapshot.png

Test3.dwg

Share this post


Link to post
Share on other sites
steven-g

Can you explain the logic of what you are trying to do, and which lookups are doing what, there is so much going on in your block that trying to reverse engineer it would take some time. Which you could hopefully clear up with a description of what is supposed to happen?

Share this post


Link to post
Share on other sites
sketch11

What I'm trying to do is have multiple states using lookup actions and tables.

Because you can have only 1 Visibility State, in order to create others, you have to setup arbitrary/dummy Linear Parameters (or Point Parameters) to associate the visibility with the dimension or point.

Not that I fully understand it, but was following the instructions in the links below.

 

With my drawing:

- The arbitrary dimensions in the hexagon shape correspond to the grips above the weld symbol.

- The Double Set was inserted from the Parameter Sets (see instructions below). 1 Lookup Action is for the grips & arbitrary dimensions. 1 Lookup Action relates them to the Visibilities.

- With the Visibility States:

"Nothing A-S ◯ ◀ > 1-↗" means "No weld symbol, Arrow-Side, Circle (all around weld), Flag is on (site weld), Tail is on (for note), 1 arrow".

"Nothing A-S ◯ ◀ > 2-↗" means "No weld symbol, Arrow-Side, Circle (all around weld), Flag is on (site weld), Tail is on (for note), 2 arrows".

The only difference is there is 2 arrows. The first visibility should give the first image above.The second visibility should give the second image above.

 

I don't know if the inputs are wrong or there's a setting I've change by mistake.

 

 

LINKS

https://www.youtube.com/watch?v=S25tO_wj2fo

https://www.youtube.com/watch?v=cYZGh70ttF8&t=739s

https://www.youtube.com/watch?v=KCcoHcyQZAY

 

INSTRUCTIONS for Double Set: TO MAKE A DOUBLE LOOKUP: Go to Parameter Sets in the Block Authoring Palette. Copy and paste the Lookup Set. Rename as Double Lookup Set. Under Properties, at Actions/Lookup, where the 3 dots are, add another Lookup action object. Now try adding the new Double Lookup Set parameter set. You should see 2 Lookup Actions as thunder icons, if not, change the variable BACTIONBARMODE = 0. In the first Lookup Action, add in multiple Properties (corresponding to the Linear Parameters or Point Parameters). Write in all the permutations available. In the second lookup, add the Visibility Parameter. The inputs would be each of the manual inputs at the Visibility States. Lookup Properties are the combination of numbers used in the various Input Properties.

Share this post


Link to post
Share on other sites
steven-g

When you are trying tricks like these AutoCAD is very fussy that you do things correctly, in your block there are no actions that match up with you linear parameters, there also needs to be an object selected for those actions, watch that second video you linked too at about the 5.30 minute position your parameters also need to be set as a list of defined measurements.

This is a tricky subject to get the hang of, but well worth the effort. And a tip it is much easier to keep your linear parameters horizontal and stacked above each other as in that video it just makes it easier to see what is what and keep your actions organised as well.

  • Like 1

Share this post


Link to post
Share on other sites
sketch11

Great, thanks for pointing that out.

The attached is a simplified version with a framework that seems to work.

 

I wanted to also ask, whether the number of visibility states slows down AutoCAD.

At the moment I have 240 states.

Yesterday I was working on an existing drawing 8MB in size and created a simple dynamic block with just 4 grips to move from each corner. It slowed down the system considerably.

Is this typical with dynamic blocks?

 

 

Test3b.dwg

Share this post


Link to post
Share on other sites
sketch11

I did try as well to update the Double Set "Lookup Actions" (with my original method), just by re-writing all the numbers, and this seems to have worked for about the first 4 visibilities, but when I continued it didn't work for some reason.

I was wondering if there's an update setting which is causing an issue.

 

Strange because in the early stage of testing the block, I was getting drawing changes when changing grips.

Share this post


Link to post
Share on other sites
steven-g
4 hours ago, sketch11 said:

I wanted to also ask, whether the number of visibility states slows down AutoCAD.

At the moment I have 240 states.

Yesterday I was working on an existing drawing 8MB in size and created a simple dynamic block with just 4 grips to move from each corner. It slowed down the system considerably.

Is this typical with dynamic blocks?

 

 

Test3b.dwg 421.64 kB · 0 downloads

It is something I have experienced, but it is not the visibility states it is the use of the blocks in your drawing, any change to a dynamic block creates an annonymous block. In theory a block is created once and each instance of blocks you place just uses that block definition, which saves time and drawing size. But a dynamic block does have it's own unique characters so one block might use visstate 1 and another visstate 2, or they might have different stretches applied, and AutoCAD needs to keep track of that information as well, so it creates annonymous block names, and it is this that slows a drawing down. I once had a door block with 300 attributes and o couple of dozen lookups for multiple choice entries, the drawing became unworkable after a certain number of blocks where inserted (it could take half an hour to respond), eventually I had to give up on that block. Sometimes simpler is better and I ended up with using multiple blocks.

 

When you create a block and insert it and then later edit the block, the already inserted blocks won't properly update especially if they contain attributes, you need to run the 'attsync' command and select one of the inserted blocks. And with dynamic blocks sometimes you just have to delete any existing blocks and insert them again with the new version.

  • Like 1

Share this post


Link to post
Share on other sites
sketch11

Thanks for advising with respect to the complexity of the block.

 

Regarding the query with respect to updating, I'm still having issues.

The issue is with objects. When "Make Visible" or "Make Invisible" is chosen, the change is not reflected outside of the Block Editor. I've double checked the tables in the Lookup Actions and it's all correct.

It's weird because I got the first few to work and the next couple won't work. I did try PURGE and this made a couple work that weren't working, but not others.

I am modifying Lookup Actions as I go ... I wonder if this causes issues.

It's difficult to explain.

 

Share this post


Link to post
Share on other sites
steven-g

There are no fixed rules on this (at least nothing that I know of), but with dynamic blocks 'things' happen. Sometimes with existing blocks after you make an edit in the block editor the changes are made in existing blocks, other times they don't work, in that case all you can do is delete the old block and insert it again, especially when you are just testing and developing a new block.

  • Like 1

Share this post


Link to post
Share on other sites
sketch11

OK thanks for letting me know.

It is quite frustrating though as I will make changes in the future. Reinserting the block did not work.

Share this post


Link to post
Share on other sites
steven-g

If reinserting doesn't work that just means there is a problem with the block, it can get very frustrating trying to figure out where it has gone wrong, but there is an error somewhere.

  • Like 1

Share this post


Link to post
Share on other sites
sketch11

OK thanks I'll keep looking into.

Share this post


Link to post
Share on other sites
ammobake

Yeah it's really sometimes just a matter of troubleshooting, testing, troubleshooting, testing, etc.. until you get it where u want.

 

Dynamic blocks are a great way to learn how autocad treats blocks in general though.

 

The concept is very similar to how other autodesk features work. 

 

  • Like 1

Share this post


Link to post
Share on other sites
sketch11

After a lot of testing, I still don't know what the exact reason/s why the visibility states don't show. It may possibly be (1) Issue with the first row values in the Property Lookup Table, try rewriting (2) Any rows which are added (out of sequence) in between others in the Property Lookup Table for the Visibilities, try deleting and reinserting.

 

The attached block works now but it took more time debugging than compiling.

There are 4 weld symbols (1 custom), 3 options for sides (arrow, other, both), all around weld Y/N, flag Y/N, tail Y/N.

There are 192 states which may be too much in a real drawing but I haven't tested.

 

I was wondering if there is a way to export data from Excel as it's difficult working with the Property Lookup Table in AutoCAD.

Drawing_Weld-Trial.dwg

Share this post


Link to post
Share on other sites
steven-g

Looking good up to now. Yes it is a lot of work for something like this, but unfortunately that is the nature of the beast. Working with parameters and actions is a manual task, yes you can copy/paste data into individual rows in a lookup but not with ranges, so it doesn't really help much. The people over in the 'Lisp' area of the Forums might be able to help you with that!

  • Like 1

Share this post


Link to post
Share on other sites
sketch11

OK thanks for clarifying that LISP is required.

Share this post


Link to post
Share on other sites
sketch11

With the Flip Parameter, all the visibility grips go back to a default (no selections), so you lose what you had before flipping.

Is there a way to resolve this?

Share this post


Link to post
Share on other sites
steven-g

try removing the visibilty parameters/actions from the flip action, unless you absolutely have to flip them. But this getting into difficult terrain some parameters are choosy over what needs to be selected and what doesn't, there are some parameters that will only work with other parameters when you only select either the parameter or just the action of that parameter, and this really is a trial and error experience.

  • Like 1

Share this post


Link to post
Share on other sites
zaphod
7 hours ago, sketch11 said:

With the Flip Parameter, all the visibility grips go back to a default (no selections), so you lose what you had before flipping.

Is there a way to resolve this?

 

I didn't notice the flip action behaving that way, it could be a version issue.

neat block, and really neat method, looks like I have to read up on this, and practice, I can see this in my future. 

  • Like 2

Share this post


Link to post
Share on other sites
sketch11

steven-g, I did try some of the things you mentioned but had no luck.

zaphod, glad it's useful.

 

Edit: It looks like the basepoint is causing the issue.

Edited by sketch11

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...