Hi
I am having a script for Clamp Support with Shoe, when I am trying to register the script getting error as below
File "<string>", line 1, in <module>
File "varmain\custom.pyc", line 367, in dumpAll
File "varmain\custom.pyc", line 324, in dumpAll
File "varmain\custom.pyc", line 311, in dumpFile
File "varmain\custom.pyc", line 288, in dumpScript
TypeError: list indices must be integers, not str
What is the solution for this? Below is the Script.
from aqa.math import *
import math
from varmain.supportssub.csgcsub.csgc002 import *
from varmain.supportssub.csgcsub.csgc001 import *
from varmain.primitiv import *
from varmain.var_basic import *
from varmain.custom import *
@Anonymous(Group="Support", TooltipShort="Shoe clamp", TooltipLong="Clamp with Shoe", LengthUnit="mm", Ports=1)
@group("MainDimensions")
@param(D=LENGTH, Tooltipshort="Clamp Diameter", TooltipLong="Inside Diameter of pipe support")
@param(L=LENGTH0, Tooltipshort="Clamp Length", TooltipLong="Length of Clamp")
@param(W=LENGTH0, Tooltipshort="Clamp Thickness", TooltipLong="Thickness of Clamp")
@param(K=LENGTH0, Tooltipshort="Overall wdith", TooltipLong="Overall wdith of the clamp")
@param(SL=LENGTH0, Tooltipshort="Base Length", TooltipLong="Length of the base plate")
@param(SW=LENGTH0, Tooltipshort="Base Width", TooltipLong="Base plate Width")
@param(ST=LENGTH0, Tooltipshort="Base Thickness", TooltipLong="Thickness of the matel sheets")
@param(SH=LENGTH0, Tooltipshort="Support Height", TooltipLong="Height of the support to the center of the pipe")
@param(E=LENGTH0, Tooltipshort="Clamp location", TooltipLong="Distance of Matel sheet edge to clamp")
#@group(Name="meaningless enum")
#@enum(1, "align X")
#@enum(2, "align Y")
#@enum(3, "align Z")
def CSGB0011(s, D=116.0, L=30.0, W=4.0, K=0.0, SL=180.0, SW=100.0, ST=8.0, SH=150.0, E=50.0, ID = 'CSGB0011', **kw):
R1 = D/2.0
HS = SH-R1
o1 = BOX(s, L=8.0, W=180.0, H=150.0-R1).translate(((HS/2.0)+R1, 0, 0))
o2 = BOX(s, L=100.0, W=180.0, H=8.0).translate((SH-(ST/2.0), 0, 0))
o1.uniteWith[o2]
o2.erase()
if L > 0.0:
if W > 0.0:
LS = SL-L-(E*2.0)
o4 = CSGC002(s, D=116.0, L=30.0, W=4.0, K=0.0, ID = 'CSGC002', **KW).rotateY(-90).translate((0, 0, 0-(LS/2.0)))
o4.rotateZ(30)
o1.uniteWith[o4]
o4.erase()
o5 = CSGC002(s, DD=116.0, L=30.0, W=4.0, K=0.0, ID = 'CSGC002', **KW).rotateY(-90).translate((0, 0, LS/2.0))
o5.rotateZ(30)
o1.uniteWith[o5]
o5.erase()
o1.rotateY(90)
s.setPoint([0.0, 0.0, 0.0], [-1.0, 0.0, 0.0])
s.setLinearDimension(SH, [0,0,0], [0,0,-SH])
s.setPoint([0.0, 0.0, -(LS/2.0)], [0.0, 0.0, 1.0])
s.setPoint([0.0, 0.0, (LS/2.0)], [0.0, 0.0, -1.0])
s.setPoint([0.0, 0.0, (LS/2.0)], [0.0, 0.0, 1.0])