??? VBScript Macro for a shaft ???
??? VBScript Macro for a shaft ???
(OP)
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,





RE: ??? VBScript Macro for a shaft ???
bye
Naveen
RE: ??? VBScript Macro for a shaft ???
I have the feeling that the shaft is missing some information, which is strange, because when I construct it on the screen everything is OK...
Does somebody have a functional script that generates a sphere or any kind of "shaft" or "revolving" object?
Thank you!
Ivanka
RE: ??? VBScript Macro for a shaft ???
part1.Update
If somebody has a macro that generates a shaft or a surface of revolution, please send it!
Thank you in advance!
Ivanka