ivaior
Computer
- Jun 18, 2004
- 4
Hi,
I am trying to generate a macro for "shaft" creation. I tried with different profiles and axes, but I cannot generate a functional macro. It gives me an error when I run it.
Here is a part of the code I have:
Set shapeFactory1 = part1.ShapeFactory
Set reference1 = part1.CreateReferenceFromName("")
Set shaft1 = shapeFactory1.AddNewShaftFromRef(reference1)
Set bodies1 = part1.Bodies
Set body1 = bodies1.Item("MechanicalTool.1")
Set sketches1 = body1.Sketches
Set sketch1 = sketches1.Item("Sketch.1")
Set reference2 = part1.CreateReferenceFromObject(sketch1)
shaft1.SetProfileElement reference2
part1.Update
And the error is "the method update failed"
Does anybody have a cue?
Thanks,
I am trying to generate a macro for "shaft" creation. I tried with different profiles and axes, but I cannot generate a functional macro. It gives me an error when I run it.
Here is a part of the code I have:
Set shapeFactory1 = part1.ShapeFactory
Set reference1 = part1.CreateReferenceFromName("")
Set shaft1 = shapeFactory1.AddNewShaftFromRef(reference1)
Set bodies1 = part1.Bodies
Set body1 = bodies1.Item("MechanicalTool.1")
Set sketches1 = body1.Sketches
Set sketch1 = sketches1.Item("Sketch.1")
Set reference2 = part1.CreateReferenceFromObject(sketch1)
shaft1.SetProfileElement reference2
part1.Update
And the error is "the method update failed"
Does anybody have a cue?
Thanks,