Community
Dynamic Blocks Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Double Lookup problem

13 REPLIES 13
Reply
Message 1 of 14
ChrisMackayOpticad
576 Views, 13 Replies

Double Lookup problem

Ok,

 

One for the guru's!!!

 

I am trying to create a block (attached) that has 2 attributes stacked on top of each other.  When you rotate the block to the 180 and 270 degree positions (using the rotate parameter of course) the attributes are meant to flip position.  The problem is that they do not do this when I set the rotation parameter to 180 degrees.  However I can set the rotation parameter to 180 degrees and then when I select the rotation grip again it flips the attributes!! I mean as soon as I select the grip.... i don't need to change its location.  The same thing happens when the attributes should flip back in the 0 and 90 degree positions.  Have a play about with the attached block and you will hopefully see what I mean.  It's an issue I have seen with a few other blocks I have created.

 

 

13 REPLIES 13
Message 2 of 14
ojuris
in reply to: ChrisMackayOpticad

is it working right way?
Message 3 of 14
ojuris
in reply to: ChrisMackayOpticad
Message 4 of 14
ChrisMackayOpticad
in reply to: ojuris

No.  That isn't it.

 

What I am trying to achieve is having the C attribute always either above the X attribute or to the left of the X attribute regardless of the block rotation parameter (0,90,180 or 270).  

 

My version more or less does that but not as soon as you change the rotation parameter.  The attributes flip position only after you reselect the rotation parameter grip.

 

thanks

 

Chris

Message 5 of 14
Libbya
in reply to: ChrisMackayOpticad

Are you saying the issue you are seeing is when you change the "Rotation" field in the block Properties?  If so, then you should know that when you change that field you are *not* changing the value for the rotation parameter within the block, but rather changing the rotation of the entire block.  That field is present for all blocks regardless of whether or not there is a dynamic rotation parameter within and when there is a dynamic rotation within, you are actually changing the direction that corresponds to the 0 value for that dynamic rotation.

 

Aside from that, you have a couple different issues with your block.  In order for your double lookup to work, the lookup properties of the two tables must match.  In your case they don't.  You have the dynamic 'Angle1' parameter set so that 'show properties' is set to NO.  If you want to change the dynamic Angle1 parameter value using the Properties, you need to set that to YES and then make sure you change that value rather than the whole block rotation property.

 

I fixed your block so that it works correctly for me.  C is always above or to the Left of the X regardless.  I fixed the lookup tables so that the lookup properties matched.  I also changed the Angle1 so that 'show properties' is YES and so that is is a List rather than Increment.  That makes selecting the angle in properties easier.

Message 6 of 14
Libbya
in reply to: Libbya

If you want to use angles other than ortho, the attached block also works properly for all angles.

Message 7 of 14
ChrisMackayOpticad
in reply to: Libbya

Thanks for the reply.

 

I am aware of the block rotation property being distinct from the rotation parameter property.  I had set "show properties" to no intentionally believe it or not.  I want to force users to use grips to change the parameter values and would prefer that dynamic blocks don't show the properties for all parameters generally.

 

From testing the block you attached the issue appears to be fixed now.  I'm still not quite sure what the issue was with my block however. ie why would the attributes only flip after reselecting the rotation parameter grip.

 

many thanks

 

Chris

Message 8 of 14
ChrisMackayOpticad
in reply to: Libbya

Yeah, thanks.

 

I have actually created many different blocks that do this, and have text/attributes that work in several different ways using chain actions and double lookups etc.

 

Like I saidm my real query was what causes the strange anomally where the lookup action sometimes doesn't kick in straining after changing the rotation parameter but only when you select the rotation grip again AFTER you have changed the rotation parameter.

 

The original block I posted does this.  I have made others that had the same fault also.

 

Chris

Message 9 of 14
Libbya
in reply to: ChrisMackayOpticad

I don't know what created the initial fault.  The fault was in the double lookup itself.  In fixing your block, I deleted your existing double lookup and replaced it as yours edited to the same settings did not produce the desired effect.

 

As an aside, your comments about your experience seem defensive in nature.  In the attempt to help I may relay whatever information I think might be helpful.  Obviously me stating information that you already know is in no way irritating or offensive unless you choose to take it that way.  

 

Here are a couple other potentially helpful ideas (that you might already know).  When expressing a range of values in the lookup table, you can use a bracket on one side of the range and a parenthesis on the other.  The bracket will make the range include the value on that side and the parenthesis will exclude the value on its side.  Although it doesn't really apply to this block due to the increment value on the rotation.  E.g. you can have one range be [0-90) and the next be [90-180), etc... rather than [0-90] and [91-180].  You will then include all the potential values between 90 and 91.  You can also have more than one range on a single line of the lookup table.  E.g. you can have [0,90),[270,359.99999] rather than separating those two ranges onto two different rows.  

Message 10 of 14
ChrisMackayOpticad
in reply to: Libbya

No offence or irritation was taken Libbya.  Apologies if my tone seemed defensive.  That was not my intention.

 

thanks again for your help.

 

 

Message 11 of 14
Libbya
in reply to: ChrisMackayOpticad

Right on.  

Message 12 of 14
ChrisMackayOpticad
in reply to: Libbya

My hunch is that the source of the problem could be, as you suggest, to do with the value ranges specified for angles.  I was using square brackets throughout so your tip re. square brackets AND parenthisis might help.  so thanks for that.

 

right on indeed!

Message 13 of 14
Libbya
in reply to: ChrisMackayOpticad

I played with your original file a bit more.  I think the double lookup is just broken.  Changing the values doesn't help.  I tried deleting the rotation and flip and replacing them, no dice.  I then deleted the action Lookup1 and replaced it, still not working.  I then deleted Lookup2 and found you can't re-add that one.  I then tried deleting Lookup1 and changing the input to the flip and changing Lookup2 input to the rotation and that worked.  Hard to say what's what.

Message 14 of 14
ChrisMackayOpticad
in reply to: Libbya

Thanks for your effort.  It kind of good to know that it's not something glaringly obvious I am doing wrong.  

 

It is a strange one however.  It's not all that uncommon in the last few block libraries I have been building.  I have generally rectified previous blocks by deleting the lookups and starting again from fresh, never really pinpointing the issue though.

 

thanks again

 

Chris

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

Post to forums  

”Boost

 

”Tips

 

”Services