Is there a method to make the python custom script .pyd only with no need to import it in .py file

Is there a method to make the python custom script .pyd only with no need to import it in .py file

aa.nazeeh
Participant Participant
293 Views
1 Reply
Message 1 of 2

Is there a method to make the python custom script .pyd only with no need to import it in .py file

aa.nazeeh
Participant
Participant

Hello, I do not know why I have to make pyd file. then import the methods into another .py file so that it works. What is the proper method to make pyd file work directly without the need for py file.

The .py file should have these imports so that it can work. I want to add all the code to the pyd file is that possible?
File name should be FLANGE.py

from aqa.math import *
from varmain.primitiv import *
from varmain.custom import *
@activate(Group="Flange",
 TooltipShort="Weld Neck Flange",
 TooltipLong="This is a custom script to create Weld Neck flange"LengthUnit="in"Ports=2)
@param(SIZE=LENGTH, TooltipShort="Flange size")
@param(CLASS=LENGTH, TooltipShort="Flange Class")
@enum(1"align X")
@enum(2"align Y")
@enum(3"align Z")
def FLANGE(sSIZE=0, CLASS=0**kwaanazeeh_0-1730348034268.png

 

0 Likes
294 Views
1 Reply
Reply (1)
Message 2 of 2

matt.worland
Collaborator
Collaborator

The last I tested this, Plant 3D required a PY as the main calling function for the PlantRegisterCustomScripts. I never found a better solution than having a PY call a PYD.

If my reply was helpful, please give a "Thumbs Up" or "Accept as Solution"
0 Likes