hallo!
ich bin anfänger un muss für ein projekt was programmieren..
folgendes Problem:
mein code:
Sub parameter_auslesen()
Dim l2, d2 As String
Call GetCATIA
End Sub
Function GetCATIA() As Object
Set catia = GetObject(, "CATIA.Application")
If catia Is Nothing Then
Set catia = CreateObject("CATIA.Application")
catia.Visible = True
End If
Set GetCATIA = catia
Dim documents1 As Object
Dim productDocument1 As Object
Dim partDocument1 As Object
Dim part1 As Object
Dim parameters1 As Object
Dim length1 As Object
Dim parameters2 As Object
Dim length2 As Object
Set catia = GetCATIA
Set documents1 = catia.Documents
Set productDocument1 = catia.ActiveDocument
Set partDocument1 = documents1.Item("Rohr.CATPart")
Set part1 = partDocument1.Part
Set parameters1 = part1.Parameters
Set length1 = parameters1.Item("Laenge")
Set parameters2 = part1.Parameters
Set length2 = parameters1.Item("Durchmesser")
l2 = length1.Value
d2 = length2.Value
End Function
ich möchte die werte l2 und d2 aus der Function ins Hauptprogramm übergeben
hat jemand ne lösung für mich
danke
joejoeanf
ich bin anfänger un muss für ein projekt was programmieren..
folgendes Problem:
mein code:
Sub parameter_auslesen()
Dim l2, d2 As String
Call GetCATIA
End Sub
Function GetCATIA() As Object
Set catia = GetObject(, "CATIA.Application")
If catia Is Nothing Then
Set catia = CreateObject("CATIA.Application")
catia.Visible = True
End If
Set GetCATIA = catia
Dim documents1 As Object
Dim productDocument1 As Object
Dim partDocument1 As Object
Dim part1 As Object
Dim parameters1 As Object
Dim length1 As Object
Dim parameters2 As Object
Dim length2 As Object
Set catia = GetCATIA
Set documents1 = catia.Documents
Set productDocument1 = catia.ActiveDocument
Set partDocument1 = documents1.Item("Rohr.CATPart")
Set part1 = partDocument1.Part
Set parameters1 = part1.Parameters
Set length1 = parameters1.Item("Laenge")
Set parameters2 = part1.Parameters
Set length2 = parameters1.Item("Durchmesser")
l2 = length1.Value
d2 = length2.Value
End Function
ich möchte die werte l2 und d2 aus der Function ins Hauptprogramm übergeben
hat jemand ne lösung für mich
danke
joejoeanf