How to properly call a python file from another python file to make an Assembly

How to properly call a python file from another python file to make an Assembly

hyrro_velasquez
Advocate Advocate
1,000 Views
1 Reply
Message 1 of 2

How to properly call a python file from another python file to make an Assembly

hyrro_velasquez
Advocate
Advocate

Hi Ma'am/Sir, It's me again, Sorry I have no where to go, this forum is the only way for me right now to gather information for development of support customization in plant3D through python scripting, since I cannot find any company here in the Philippines that cater such training. I really need help. I created five python file which containing a script for custom support parts and added it inside Plant3D through spec editor, which is a success. Also I created again a python file which I use to call the five python support parts using this line of codes (from PSL_PC3_CSR1 import *), to make a one support assembly, and added it also on my spec to be used inside plant3D, which is also a success the parts is now assembled in one python file. now the problem is, I added a "s.setLinearDimension" on my python support assembly so that it will have a grip point inside Plant3D, After placing it inside Plant3D for testing, the grip point is there, but unfortunately when I try to adjust it support length using the grip point it did not work, but when I try to create a rod only on another python file, meaning cylinder only with default length and added the "s.setLinearDimension" on it, the grip point work it adjust inside plant3D. I don't know how I will gonna apply the "s.setLinearDimension"  on a python file that consist of many parts as a assembly. I attached a screenshot of my python script below, because I cannot paste it here(I don't know why). but please check my script below. I will really appreciate your help Ma'am/Sir's and I will be forever grateful. thank you in advance.

0 Likes
1,001 Views
1 Reply
Reply (1)
Message 2 of 2

rajendra.prajapat
Advisor
Advisor

@hyrro_velasquez  please use below syntax in your python scripts.

import sys

from aqa.math import *
from varmain.primitiv import *
from varmain.var_basic import *
from varmain.custom import *

If my reply was helpful, please give a "Kudo" or click the "Accept as Solution" button below (or both).
0 Likes