Replace component by VBA and Imates !!!!!!!!!! HELP !!!!!!!!!!!

Replace component by VBA and Imates !!!!!!!!!! HELP !!!!!!!!!!!

Anonymous
Not applicable
603 Views
4 Replies
Message 1 of 5

Replace component by VBA and Imates !!!!!!!!!! HELP !!!!!!!!!!!

Anonymous
Not applicable
Our basic product is a combination from several assemblies which are placed on Composit Imates. For each project we have to customize this product by replacing components. When I activate "replace component", I get the warning "Possible Constraint Loss", I confirm with "OK" and the sub-assembly is replaced correct. The problem is that the VBA code does not wait for the warning box, so I can not activate OK to accept the warning. What can I do to prevent or to accept this warning ?
0 Likes
604 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
What happens, if you set
Application::SilentOperation to true?

 

Steffen Pudor


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Our
basic product is a combination from several assemblies which are placed on
Composit Imates. For each project we have to customize this product by
replacing components. When I activate "replace component", I get the warning
"Possible Constraint Loss", I confirm with "OK" and the sub-assembly is
replaced correct. The problem is that the VBA code does not wait for the
warning box, so I can not activate OK to accept the warning. What can I do to
prevent or to accept this warning ?
0 Likes
Message 3 of 5

Anonymous
Not applicable
Steffen, thanks for the suggestion.
We tried this, but it does not suppress the message.
0 Likes
Message 4 of 5

Anonymous
Not applicable
It is possible to avoid the Messagebox with warning when replacing components/assembly's by using the next sample code:

Dim oOccurrence as ComponentOccurrence
Set oOccurrence = ThisApplication.ActiveDocument.
.ComponentDefinition.Occurrences.Item(1)
oOccurrence.Replace C:\Temp\Part2.ipt", True

ThijsR (Holland)
0 Likes
Message 5 of 5

Anonymous
Not applicable
The fact that SilentOperation does not work in this
case is a bug.  I've filed a defect.

 

-Brian


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Steffen,
thanks for the suggestion.
We tried this, but it does not suppress the
message.
0 Likes