Jump to content

Change block A inside block B using block B's attribute


Gotrekk

Recommended Posts

Hi everyone,

 

- i have a block called "car", with an attribute called "wheel_att".

- i have four different blocks called wheelA, wheelB, wheelC, wheelD with different shapes etc.

- inside that "car" block, i create a block called "wheel".

- i now have hundreds "car" blocks with the attribute "wheel_att" set as "wheelA", "wheelB", "wheel_C" or "wheel_D"

 

is there a way to change the "wheel" block inside each "car" block using the attribute "wheel_att"?

 

i hope i've been clear enough on the explanation! thanks in advance!

Link to comment
Share on other sites

What are you looking to change exactly?

 

From your post I have understood:

 

'CAR' has attribute 'WHEEL_ATT'

'CAR' contains nested block 'WHEEL'

 

If this is the case, you will not be able to change WHEEL per reference of CAR as any change to the definition of CAR will be reflected across all references.

Link to comment
Share on other sites

Yes Lee, you got my problem and i think i understand what you mean.

Should i try using a dynamic block with visibility states like "wheelA", "wheelB" and so on, showing only the "wheel" i need? Would i be able to set the visibility state from an attribute?

 

Example:

i have many cars with "rounded wheels" and many with "squared wheels".

I have the "car" block with attribute "wheel_att" containing either "round_wheel" or "square_wheel".

How can i display those cars with the appropriate wheels design?

 

I don't want to create separate squared_wheels_car and rounded_wheels_car blocks because i have other attributes defining other car parts like door, cockpit and so on

What would it be the best way of doing it?

 

thanks again

Link to comment
Share on other sites

Yes, you could use a dynamic block with visibility states; though, the easiest way would be to simply not nest the wheel block within the car block, but maybe group the wheel block with the car block if necessary.

Link to comment
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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...