Arun_Gopala
New member
Dear All
I have recorded editing shaft First angle macro in CATIA V 5-6 R2017 and then I tried to run it it gives me an error saying
The Method Dimension failed
Line: 27
Here is the script below
Language="VBSCRIPT"
Sub CATMain()
Dim partDocument1 As Document
Set partDocument1 = CATIA.ActiveDocument
Dim part1 As Part
Set part1 = partDocument1.Part
Dim bodies1 As Bodies
Set bodies1 = part1.Bodies
Dim body1 As Body
Set body1 = bodies1.Item("PartBody")
Dim shapes1 As Shapes
Set shapes1 = body1.Shapes
Dim shaft1 As Shape
Set shaft1 = shapes1.Item("Shaft.1")
Dim limit1 As CATBaseDispatch
Set limit1 = shaft1.GetItem("Limit.1")
Dim angle1 As Length
Set angle1 = limit1.Dimension
angle1.Value = 200.000000
part1.Update
End Sub
please look into the issue,Any help is appreciated.Thanks
I have recorded editing shaft First angle macro in CATIA V 5-6 R2017 and then I tried to run it it gives me an error saying
The Method Dimension failed
Line: 27
Here is the script below
Language="VBSCRIPT"
Sub CATMain()
Dim partDocument1 As Document
Set partDocument1 = CATIA.ActiveDocument
Dim part1 As Part
Set part1 = partDocument1.Part
Dim bodies1 As Bodies
Set bodies1 = part1.Bodies
Dim body1 As Body
Set body1 = bodies1.Item("PartBody")
Dim shapes1 As Shapes
Set shapes1 = body1.Shapes
Dim shaft1 As Shape
Set shaft1 = shapes1.Item("Shaft.1")
Dim limit1 As CATBaseDispatch
Set limit1 = shaft1.GetItem("Limit.1")
Dim angle1 As Length
Set angle1 = limit1.Dimension
angle1.Value = 200.000000
part1.Update
End Sub
please look into the issue,Any help is appreciated.Thanks