- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
I'm trying to make my first custom part insulation Ebow with python.
Following AUTODESK UNIVERSITY Annex B: Creating Custom Component Scripts in Plant 3D as guide document.
I have created my python script, but when I use PLANTREGISTERCUSTOMSCRIPTS, it shows the following:
Command: PLANTREGISTERCUSTOMSCRIPTS
SyntaxError: invalid syntax
Here my this code :
import aqa.math
import math
from varmain.primitiv import *
from varmain.var_basic import *
from varmain.custom import *
def activate(Group, Ports, TooltipShort, TooltipLong, LengthUnit):
pass
@Anonymous(Group="Fittings", TooltipShort="Elbow Insulation", TooltipLong="Insulation Elbow", LengthUnit="mm")
@group("MainDimensions")
@Anonymous(D=LENGTH, TooltipShort="Radius of Elbow")
@Anonymous(R=LENGTH, TooltipShort="Bend Radius")
@Anonymous(A=ANGLE, TooltipShort="Bend Angle")
@Anonymous(S=LENGTH, TooltipShort="Number of Segments")
@group(Name="meaningless enum")
@enum(1, "align X")
@enum(2, "align Y")
@enum(3, "align Z")
def Insulation_Elbow(s, D1 = 120.0, R1 = 152.0, A1 = 90.0, ID = 'Insulation_Elbow', **kw):
s=ARC3DS(s, D=D1, R=R1 , A=A1 S=S1 ).translate((0, 0, H / 2.0)).rotateZ(90.0)
s.setPoint((0.0, 0.0, 0.0), (-1.0, 0.0, 0.0), 0 , 0.0, D)
return
Can you help me? I'm trying to modify the script but with no success.
Solved! Go to Solution.