Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro to access the tooling info from the CATIA.process file

Status
Not open for further replies.

Pramodmn

Mechanical
May 19, 2015
2
IN
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.
 
Replies continue below

Recommended for you

Hi,

Can anybody help on this please.?

Many thanks.

Regards,
PRamod M N
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top