Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Majjek
in reply to: MjDeck

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 XCenter YPosition XPosition Y
Start16,736281614,54461929817,050794694,566641091
Before reposition17,220160034,54182058117,050794694,566641091
After first reposition16,905646954,51979878816,736281614,544619298
Final16,736281614,54461929816,566916264,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:

Majjek_0-1660889807386.pngMajjek_1-1660889817546.png