HI,
I have created a VBSCRIPT to access the tool information form the CATIA Process file, but I am getting an error as "Get method item failed".
Aim: I need to access the tool information from the NC programmed file which is in CATIA V5.
please help me . here is the code.
Dim VBSCRIPT
Dim CATIA As Object
Dim catvbs
Dim Apps
Dim VL as intieger
Dim session
Dim docprocess As DocumentLibraryVersion
Dim constraint
Dim parameters1
Dim parameters
Dim connections As Action
Dim product1 As Object
Dim pmn As Integer
Sub CATMain()
Set CATIA = GetObject(, "Catia.Application")
Set processDocument1 = CATIA.ActiveDocument
Set product1 = processDocument1.GetItem("T1 Ø40R0.8 CUTTER")
Set parameters1 = product1.parameters
Set product2 = processDocument1.GetItem("PPRProduct")
Set products1 = product2.products
Set product3 = products1.Item("Resource.1")
Set products2 = product3.products
Set reference1 = products2.Item("Product1.3")
Set parameters2 = parameters1.SubList(reference1, True)
Set length1 = parameters2.Item("PPRProduct\Resource.1\Product1.3\CATSpecXMan.1\Product1.3\GeometryParameters.1\Nominal diameter")
VL= length1.Value
Range("A1").value= VL
End sub
these codes are generated by CATIA file itself.
I have created a VBSCRIPT to access the tool information form the CATIA Process file, but I am getting an error as "Get method item failed".
Aim: I need to access the tool information from the NC programmed file which is in CATIA V5.
please help me . here is the code.
Dim VBSCRIPT
Dim CATIA As Object
Dim catvbs
Dim Apps
Dim VL as intieger
Dim session
Dim docprocess As DocumentLibraryVersion
Dim constraint
Dim parameters1
Dim parameters
Dim connections As Action
Dim product1 As Object
Dim pmn As Integer
Sub CATMain()
Set CATIA = GetObject(, "Catia.Application")
Set processDocument1 = CATIA.ActiveDocument
Set product1 = processDocument1.GetItem("T1 Ø40R0.8 CUTTER")
Set parameters1 = product1.parameters
Set product2 = processDocument1.GetItem("PPRProduct")
Set products1 = product2.products
Set product3 = products1.Item("Resource.1")
Set products2 = product3.products
Set reference1 = products2.Item("Product1.3")
Set parameters2 = parameters1.SubList(reference1, True)
Set length1 = parameters2.Item("PPRProduct\Resource.1\Product1.3\CATSpecXMan.1\Product1.3\GeometryParameters.1\Nominal diameter")
VL= length1.Value
Range("A1").value= VL
End sub
these codes are generated by CATIA file itself.