I'm trying to match the split regions and their location of one plan view to another new plan view. 2021 API added ViewCropRegionShapeManager.GetSplitRegionOffset which returns an XYZ point. It appears that no corresponding set method was added. Am I missing something?
I'm not sure if you can achieve it by setting a larger crop shape in combination with the .SplitRegionHorizontally/vertically methods.
RevitAPI.chm ViewCropRegionShapeManager.SetCropShape:
"Depending on the shape of the argument, view's crop is set to be either rectangular or non-rectangular. If the crop is set to be rectangular and it is also split, then the multiple view regions will be displayed for the view, with the same proportions as the split prior to the change, but adjusted to the new rectangular shape."
No sure if it means what I believe it means. I think it means if you create a larger rectangle you create a larger offset extent for the split.
ViewCropRegionShapeManager.SplitRegionHorizontally/vertically
This controls the portion assignments of the slit to left/right (0 to 1).
One thing noted recently on this forum was the fact ViewCropRegionShapeManager.SetCropShape can't be used to set a rectangular shape. However perhaps that is permitted if the crop has splits? If so you would have to create the splits first.
That is the shape of my argument anyway.
@RPTHOMAS108 I'm not talking about proportions, setting the shape, or the size. This is about sliding the split region to a new position that is achieved in the UI by the <-> icon of the split region. I'm guessing a setter wasn't exposed (yet?) because it is complicated by the fact that the offset position is limited by the placement of the other split regions. For example, in the UI when you slide the region over a certain amount, it will recombine with that other region.
I've not tried personally but I mentioned the above due to the wording in the RevitAPI.chm
Was following the logic that if you keep the portions the same percentage but increase the size of the overall rectangle both portions fit within (if that is what it means) then how can it do anything but increase the spacing of those portions? The scale is unchanged the portions are the same ratio (say 50/50) but the overall rectangle spanning them increases.
I don't know that to be true/false have you found out by testing?
No, I was thinking the overall extent of the crop region could be adjusted to offset the split parts based on their percentage coverage but it doesn't seem to work like that. You get two curve loops for GetCropShape when it is split once.
I think as you say they are missing a SetSplitRegionOffset
Did you ever get this figured out? I would also like to set the offset of the split views.
Until they add a SetSplitRegionOffset method, there's nothing to figure out.
Can't find what you're looking for? Ask the community or share your knowledge.