Needed bugfix and enhancement in this situation (@ADESK see also case 14798255):
Starting "Replace Model Reference" command.
The following events will be trigger:
UserInputEvents::OnStartCommand with Inv::CommandIDEnum:<2048,kDefaultCommand>
UserInputEvents::OnActivateCommand with CommandName "DrawingReplaceModelReferenceCmd"
UserInputEvents::OnStopCommand with CommandIDEnum:<2048,kDefaultCommand>
UserInputEvents::OnTerminateCommand with CommandName "DrawingReplaceModelReferenceCmd"
After(!) the terminate command the "Replace Model Reference" dialog will displayed.
If you click the "select new model" button the FileUIEvents::OnFileInsertDialog will be called.
we need to know:
1) which reference should be replaced and
2) that we are in the "Replace Model Reference" function.
Both information's are not available.
My Suggestion would be:
1) Add the model reference to the "NameValueMap Context" in the FileUIEvents::OnFileInsertDialog
2) This could be solved if the "DrawingReplaceModelReferenceCmd" is still active, or add this also to the "NameValueMap Context" in the FileUIEvents::OnFileInsertDialog
This information is necessary for an PDM/PLM integration, to check if it is allowed to change the reference.
It should not possible to change the reference, if one of the references should have the same file name like the drawing self.
I think Vault would need this information also.
Can't find what you're looking for? Ask the community or share your knowledge.