Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

use of SetHolePatchingOptions

0 REPLIES 0
Reply
Message 1 of 1
petrxn
276 Views, 0 Replies

use of SetHolePatchingOptions

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

 

0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report