- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Unfortunately I'm not able to send a sample drawing, it's quite a large model and confidential.
But I can explain the workflow.
The involved drawing (actually drawings, there are about 25 similar drawings with this issue) is sort of a template drawing. The model assembly used in the drawing consists of multiple components overlapping.
On the drawing, we set parameters defining a configuration.
Then we've created an iLogic rule, which turns the visibility on/off for the components in the assembly according to the parameters, and then updates the views on the drawing (no new annotations are made).
The bounding box of some of the views will change, because of the size of some components, but all views remain on their locations.
The one problematic view is a section view with a crop, the crop is fully constrained (also tried without the crop).
Due to the crop, the outer dimensions of the view don't change and also the part of the model shown is exactly the same, but the view moves a bit on the drawing for some reason.
I can't explain why, but I accepted the fact that it moves, so the easiest thing to do is reposition the view afterwards.
So before anything is changed, I store the Center property in a variable.
Then the visibility will get switched, causing the view to move.
Then I reposition the center of the view back to the stored location.
It does move, but not to the correct position.
Then I use the code above to translate it again, using the difference.
Now the view is in the same location again.
Here are the results from looking up the Center and Position property of the view, before moving (Start), after the visibility change, after the first reposition and the final position after the correction.
You can see that after the view has moved due to the visibility, then Position is still the same, but the center has changed.
| Center X | Center Y | Position X | Position Y | |
| Start | 16,73628161 | 4,544619298 | 17,05079469 | 4,566641091 |
| Before reposition | 17,22016003 | 4,541820581 | 17,05079469 | 4,566641091 |
| After first reposition | 16,90564695 | 4,519798788 | 16,73628161 | 4,544619298 |
| Final | 16,73628161 | 4,544619298 | 16,56691626 | 4,569439808 |
This is the view before and after, so exactly the same boundaries. The components didn't move in relation to the center point of the model: