Book a Demo

Author Topic: Shape script: tagged value of parent element  (Read 3338 times)

carolin.boeckler

  • EA User
  • **
  • Posts: 34
  • Karma: +0/-0
    • View Profile
Shape script: tagged value of parent element
« on: February 20, 2019, 06:51:43 pm »
Hello,

I habe my own MDG Profile. One of my self created Elements "MyBlock" with own _instanceType "MyPart" has a tagged value "KindOfElement" (mechatronic, electronic,...). In the shape script I change the color of "MyBlock" to show the selected "KindOfElement".
Now I want that the child elements ("MyPart") has the same color. I see in the tagged value still the tagged value of the parent value, but I have no idea how to read this parameter?
I need something like    if(hastag("parent:KindOfElement","mechatronic"))
I have only seen a solution with an AddIn. But I cannot imagine that it has to be so complicated. There must be someting like #TAG:parent:KindOfElement"

Can somebody help me?

Thanks, Caro

Boron

  • EA User
  • **
  • Posts: 111
  • Karma: +6/-0
    • View Profile
Re: Shape script: tagged value of parent element
« Reply #1 on: February 20, 2019, 08:14:06 pm »
Hello Carolin,

I am dealing with shape scripts since years.
There is noting in the shape script language to access tagged values from a parent element.

It is not even possible to access all owned tagged values, e.g. the elements of a structured tagged value (structured tagged value is owned by the element with the shape script).