groupnanax.blogg.se

Catia v5 macro
Catia v5 macro














Valore = Abs(Lunghezza.Value - misuraist) If Abs(Lunghezza.Value - misuraist) > soglia Then If GetAsyncKeyState(VKesc) 0 Then Exit Sub ' decrease factor to approximate final dimension MsgBox ("LunghezzaCurva parameter missing") Set Lunghezza = Param1.Item("LunghezzaCurva") Status = sel1.SelectElement2(inputobjecttype, "Select Sketch", True) If MsgBox("Select Curve sketch", vbOKCancel) = vbCancel Then Exit Sub Private Declare Function GetAsyncKeyState Lib "User32.dll" (ByVal vKey As Long) As Long

#Catia v5 macro update

The tensioning system will be moved with a single parameter, in this case we set as a rule that the name of the sketch constrain name to be "slave" to be easily found.Īpplication will enter a loop mode, in which every time you update the curve lenght, the sketch will adapt to follow the new situation and adjust the curve lenght until it reaches the starting dimension (within a reasonable tolerance). Once we have done this we'll write a VBA macro that will adjust the tensioning system position to reach the right curve lenght with the desired approximation. Profile measures are not exposed to VBA, so we must create a parameter that checks the lenght of the curve. Or let's check if the tensioning system is able to cope with acceptable chain elongation during its lifetime. Let's think about a chain or a belt, suppose that some pulleys or chain guides move, and you want to verify if the tensioning system is able to cope with the deformation. Create a planar curve that is of constant lenght.














Catia v5 macro