×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

CATIA Machining catscript for cuver following

CATIA Machining catscript for cuver following

CATIA Machining catscript for cuver following

(OP)
I wrote a catscript to set up the machining workbench in catia and load the component , but i cannot link the curve to be machined with curve following operation, It fails ,

if i open the failed operation manually and then re-run the program it worked.

i dont know what im doing wrong and the help files for automation arent helpfull at all.
CATIA V5 R19 .

i CAN post the code if anyone has worked on machining.

i would really grateful if anyone cold help.  

RE: CATIA Machining catscript for cuver following

(OP)
i always knew Questions on machining scripts for CATIA would be a dead end?

RE: CATIA Machining catscript for cuver following

(OP)
heres the code ntweisen

============================================
Sub setpro()

Dim thePartDoc As Document
Set thePartDoc = CATIA.ActiveDocument

Set documents1 = CATIA.Documents
Set partDocument1 = documents1.Item("6611.CATPart")
Set part1 = partDocument1.Part
Set hybridBodies1 = part1.HybridBodies
Set hybridBody1 = hybridBodies1.Item("Geometrical Set.1")
Set hybridShapes1 = hybridBody1.HybridShapes
Set Line1 = hybridShapes1.Item("Line.1")

Dim theProduct As Product
Set theProduct = thePartDoc.Product

CATIA.Documents.Add "Process"
Dim thePPRDoc As Document
Set thePPRDoc = CATIA.ActiveDocument

'*************************************************************
'*** Load Prismatic Machining Workbench
'*************************************************************
Dim theProcess As AnyObject
Set theProcess = thePPRDoc.GetItem("Process")
Set MfgDoc1 = CATIA.ActiveDocument

Set ActivityRef = MfgDoc1.GetItem("Process")
Set childs = ActivityRef.ChildrenActivities

If (ActivityRef.IsSubTypeOf("PhysicalActivity")) Then

Set childs = ActivityRef.ChildrenActivities
quantity = childs.Count

If quantity <= 0 Then
Exit Sub
End If

NumberOfSetup = 0

For i = 1 To quantity
Set child = childs.Item(i)
If (child.IsSubTypeOf("ManufacturingSetup")) Then
Set Setup1 = child
NumberOfSetup = NumberOfSetup + 1
Exit For
End If
Next

End If

If NumberOfSetup <= 0 Then
Exit Sub
End If

Setup1.Product = theProduct

Dim Prod As Product
Set Prod = Setup1.Product
Set ProgramList = Setup1.Programs
Set Program1 = ProgramList.GetElement(1)

Dim Machine1 As ManufacturingMachine
Set Machine1 = Setup1.CreateMachine("Mfg3AxisMachine") ' creates a mahine

Dim Mo As ManufacturingOperation
Dim Mo1 As ManufacturingOperation
Set Mo = Program1.AppendOperation("MfgFollowCurve", 1)

Mo.SetTool ("End Mill D 25")

Call Mo.SetGeometry("GuidingElements", Line1, Prod, 0)

End Sub
==========================================

RE: CATIA Machining catscript for cuver following

I don't have access to any of the machining workbenches at the moment, so I can't attempt to find the solution myself, but you could try something like after you set the tool:

Set motion1 = Mo.InsertToolMotion("MfgFollowCurve", 1)
Call Mo.SetGeometry("GuidingElements", Line1, Prod, 0

I actually tried doing something similar to this with KWE and posted about it on the COE forum (http://www.coe.org/p/fo/st/thread=23647) but the responses I got bascially said it was not possible with KWE.

http://excelspreadsheetshelp.blogspot.com - http://scripting4v5.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources