sphere on catiaV5
sphere on catiaV5
(OP)
hello
Im trying to construct sphere on catiaV5R7 with macro, but this method does not work :
dim hybridspher as HybridShapeSphere
set hybridspher=hybridshapefactory1.AddNewSphere(reference1, 20)
is there any one who know what s the problem with this!
thanks
Im trying to construct sphere on catiaV5R7 with macro, but this method does not work :
dim hybridspher as HybridShapeSphere
set hybridspher=hybridshapefactory1.AddNewSphere(reference1, 20)
is there any one who know what s the problem with this!
thanks





RE: sphere on catiaV5
i c that whatever u have given above is a CATscript.
try running it in VB script. it will pass. i tried it out.
im running on Catia V5R11. to change ur editor into VBscript goto TOOLS>OPTIONS>General then click the macros tab and change ur editor.then try ur Sphere.
bye
RE: sphere on catiaV5
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,
Ivanka