Why using the method CreateSection from the ViewSection class does not create an ordinary section as referenced by the blue arrow in the picture below?
I mean, why I get the symbol and the box referenced by the red arrow instead?
It is most likely the ViewType you passed into the Create method. Can you share more of the graph?
By the way, this node from Data-Shapes package creates the sections with the proper symbol. I can see that it use the same method “Create View Section” but I cannot find the difference!
It looks like it is the Overload that are being used differ. DS is using Section by line, your using Section by Bounding Box. This will create it by current view and the results will be as you see. That is also why the DS node has the additional inputs.
Actually, the DS is creating it by BoundingBox, too. The line is there just to shape the BoundingBox. But the method is the same and takes the same inputs (doc, view.Id, BB). Check line 66 in the DS script. So, I don’t know! It’s simply strange!
set the limits of bounding box it’s not enough, according the API doc it’s necessary to set the matrix transform of Bounding box to set view Direction. If not set, component BasisZ (view Direction) is equal to (0,0,1) so the view Direction is up
See Remarks from doc
A big THANK YOU!
I got it and fixing it right now.
Sorry for reopening the discussion but… I was wondering why the symbol of the section sometimes go in the opposite direction of the view direction!
As the picture below clarifies, I have four scripts in one dynamo file. Each creates a section. 2 for the x-axis with the opposite view direction and 2 for the y-axis also with the opposite view direction.
I change the transform rotation angle from 90 to -90 to get the view direction on both sides.
For the two for the y-axis, they are created properly while one of the two sections for the x-axis has a problem with flipping the symbol.
Do u have any idea why that happens?
the problem seems to come from the RBB.Max and RBB.Min properties try to swap the Z components (line 57 and 58), otherwise directly try to mirror the first ViewSection
Yeah i have expected swapping z values will fix it but it gives error message. I have solved it with mirror method already. It works greatly now. Thank you