Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ability to set Split Region Offset

7 REPLIES 7
Reply
Message 1 of 8
michael-coffey
745 Views, 7 Replies

Ability to set Split Region Offset

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? 

Labels (4)
7 REPLIES 7
Message 2 of 8

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.

Message 3 of 8

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

Message 4 of 8

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?

Message 5 of 8

I'm not following what you are saying.

Message 6 of 8

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

Message 7 of 8
scottbaldy
in reply to: michael-coffey

Did you ever get this figured out?  I would also like to set the offset of the split views.

Message 8 of 8

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.

Post to forums  

Rail Community


Autodesk Design & Make Report