Home / CATScript/VBS Inhalt / Kinematic (Mechanism)

 

Kinematic (Mechanism)


Auslesen einer Kinematik - Mechanism, Command und Joint

  Sub CATMain()

set oDoc = CATIA.ActiveDocument
set oMechs = oDoc.Product.GetTechnologicalObject("Mechanisms")
set oMech = oMechs.Item(1)
MsgBox "Name Mechanismus 1 von " & oMechs.Count & ": " & oMech.Name

set oCmds = oMech.Commands
set oCmd = oCmds.Item(1)
MsgBox "Name Befehl 1 von " & oCmds.Count & ": " & oCmd.Name
MsgBox "Aktuelle Position: " & oCmd.CurrentValue

set oJoints = oMech.Joints
set oJoint = oJoints.Item(1)
MsgBox "Verbindung 1 von " & oJoints.Count & " hat den Namen: " & oJoint.Name
MsgBox "Oberes Limit: " & oJoint.UpperLimit1
MsgBox "Unteres Limit: " & oJoint.LowerLimit1

'oJoint.UpperLimit1 = 30 'oberes Limit setzen
'oJoint.oJoint.LowerLimit1 = -30 'unteres Limit setzen

End Sub
 


Die Option Drucken funktioniert erst ab Netscape V4.0 bzw. I-Explorer 5.0 !

[erstellt 26.05.2010]