If you haven’t already seen it, the Piping sample might give you some ideas. That’s where I tried the above template. But you might not need any more ideas, if you get this working the way that you want.
I tried the code you posted in our solution and I have the same problem. I don’t understand why it’s not working as the Piping sample. Everything look similar.
I’m still getting that after loading rotated nodes :
I removed go:Part.SelectionElementName=“Shape” and I’m now getting this :
The left mixer is loaded with a angle value of 0 than rotated from 0 to 90 and the right one is loaded with a angle value of 90. The loading with angle different than 0 work fine here, but with this solution, I do have the text in the blue selection zone and that’s not what we want to do.
It’s look like when the selection Element is set to a specific element in the nodeTemplate, rotated nodes can’t load properly in our solution.
Any tips what may cause that behavior ? I’ve try to remove all the GoXam override methods we use in our solution and no change.
I’m asking again since I haven’t solved that issue yet. Do you have any idea what may cause that behavior ? I’ve noticed that the blue selection zone is always rotated correctly. What’s strange is when there is something else outside that blue selection zone in the SpotPanel(like a TextBlock in my case) what’s inside the selection zone is rotated twice. If you look at those pictures I posted, you can see that the path of the triangle is rotated of 90° for the mixer 3, 180° for the mixer 2 and 270° for the mixer 4. So it looks like the rotation is applied twice when loading to what’s inside the blue selection zone. And again it’s only in one of our solutions, it’s working fine in the piping sample and in another of our solution.
I just tried the DataTemplate that you posted above, verbatim except for changing the Key of the template to be my app’s category name. Everything worked well, at all four angles, and after saving and loading again, everything looked and had selection adornments as expected.
But I suspect that you have something wrong in your template. In your screenshot in the previous post, it appears that the selection adornments are “pointing” in the correct direction, and it is the triangular shape that is oriented in the wrong direction. So I’m wondering if you are specifying two angle transforms, one on the Node via Node.RotationAngle and another on the Shape that you implemented yourself.
And there is nothing else other than go:Node.Rotatable to rotate node in our flowsheet. But I've noticed when loading rotated node, there is no DoRotate() done and I don't know where nodes are rotated from when loaded. They are probable load and directly draw with an angle in the flowsheet. I suspect something in our solution acting with GoXam affect the way it is draw with angle. Because if they are rotated with DoRotate() everything is fine.
I also noticed the default rotate adornment is off by the angle value, which is strange.