Hello,
I have problem with setting range of hole pathcing for derived assembly trough api.
There is my test code:
Sub Test()
Dim oPartDoc As PartDocument
Set oPartDoc = ThisApplication.ActiveDocument
Dim oDerAssy As DerivedAssemblyDefinition
Set oDerAssy = oPartDoc.ComponentDefinition.ReferenceComponents.DerivedAssemblyComponents.Item(1).Definition
Dim oHolePatchType As DerivedHolePatchEnum
Dim nMinPerimeter As Double
Dim nMaxPerimeter As Double
Dim oReserved As EdgeCollection
oHolePatchType = DerivedHolePatchEnum.kDerivedPatchAll
nMinPerimeter = 0
nMaxPerimeter = 0
Call oDerAssy.GetHolePatchingOptions(oHolePatchType, nMinPerimeter, nMaxPerimeter, oReserved)
Debug.Print "Before Min: " + Str(nMinPerimeter)
Debug.Print "Before Max: " + Str(nMaxPerimeter)
nMaxPerimeter = 3
Call oDerAssy.SetHolePatchingOptions(oHolePatchType, nMinPerimeter, nMaxPerimeter)
nMaxPerimeter = 0
Call oDerAssy.GetHolePatchingOptions(oHolePatchType, nMinPerimeter, nMaxPerimeter, oReserved)
Debug.Print "After Min: " + Str(nMinPerimeter)
Debug.Print "After Max: " + Str(nMaxPerimeter)
Debug.Print "*end*"
End Sub
Problem is that this code correctlly print values of perimeter (result of After Max is correctly 3), but the component definiton is not touched and MaxPerimeter has old value. This couldbe checked by seond run of this code, or trough standard dialog.
I have found that in Inv2013 are these values also not saved with standard user dialog (without api).
Itseems that there is an bug, or I missing something?
Many thank for help,
Petr