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

Hi @jsternamanLULAE.  Is it throwing an error when it does not work?  If so, please include what the 'More Info' tab of the error message says.  Do you believe it is possible that it is deleting some, but not all of the unattached dimensions?  If that is the case, then we may need to either create a more detailed routine that checks what more specific derived type each dimension is, then react appropriately.  Or we may need to put that whole loop and delete routine out into a separate Function type routine, so that it can be called multiple times in a loop, until it no longer makes any changes.  One of the potential problems is that you are not allowed to delete the first dimension in a set.  So if you have any OrdinateDimensionSets, then you can not delete just the first OrdinateDimension from each OrdinateDimensionSet.  If you have any BaseLineDimensionSets, you can not delete the first dimension from each BaseLineDimensionSet, and so on.  So, in those cases, if that first dimension in a set is not attached you may have to delete the whole set, instead of just the one dimension.

 

Edit:  Another thing that comes to mind is that the views may have not had time to update before that code ran.  What I mean is that views can be forced to update due to changes that happened in the model, and when those changes happen, that may cause some dimensions to no longer be attached.  Well, if that updating of the views happens after the rule already ran, the rule would not have known about the dimensions not being attached.  I am not sure if the 'after open' event is triggered, running that rule, before the views get updated or not.  Just a thought.  If you run that rule manually after that point in time, does it work on that drawing then?

Wesley Crihfield

EESignature

(Not an Autodesk Employee)