Hallo,
ich möchte in einem Product in 2 verschiedenen Parts jeweils einen Punkt auswählen und diese mit einer Coincidence verknüpfen.
Leider bekomme ich das nicht hin. Gibt es dafür eine Möglichkeit?
Danke Jan
Language="VBSCRIPT"
Sub CATMain()
Dim productDocument1 As Document
Set productDocument1 = CATIA.ActiveDocument
Dim product1 As Product
Set product1 = productDocument1.Product
Dim products1 As Products
Set products1 = product1.Products
'Dim sInputPath As CATBSTR
'sInputPath = CATIA.FileSelectionBox("FileOpen", "*", CATFileSelectionModeOpen)
'MsgBox sInputPath
'Dim arrayOfVariantOfBSTR1(0)
'arrayOfVariantOfBSTR1(0) = sInputPath
'products1.AddComponentsFromFiles arrayOfVariantOfBSTR1, "All"
Dim reference1 As Reference
Dim reference2 As Reference
Dim InputObjectType1(0)
Set Document = CATIA.ActiveDocument
Selection.Clear
Set Selection = Document.Selection
InputObjectType1(0)="Point"
Status=Selection.SelectElement2(InputObjectType1,"Select a Point",true)
Set reference1 = Selection.Item(1).Reference
'MsgBox reference1.DisplayName
Dim InputObjectType2(0)
Set Document = CATIA.ActiveDocument
Selection.Clear
Set Selection = Document.Selection
InputObjectType2(0)="Vertex"
Status=Selection.SelectElement2(InputObjectType2,"Select a Point",true)
Set reference2 = Selection.Item(1).Reference
'MsgBox reference2.DisplayName
Dim constraints1 As Collection
Set constraints1 = product1.Connections("CATIAConstraints")
Dim constraint1 As Constraint
Set constraint1 = constraints1.AddBiEltCst(catCstTypeOn, reference1, reference2)
'product1.Update
End Sub
------------------
http://www.geocities.com/francesfo/smskip.gif
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP