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!

sphere on catiaV5

Status
Not open for further replies.

mouha

Computer
Dec 8, 2003
16
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
 
Replies continue below

Recommended for you

hi

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
 
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,
Ivanka
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor