Custom Python Pipe Support for Mixed Metric Project

Custom Python Pipe Support for Mixed Metric Project

Fahad_Ghoerobi
Enthusiast Enthusiast
743 Views
3 Replies
Message 1 of 4

Custom Python Pipe Support for Mixed Metric Project

Fahad_Ghoerobi
Enthusiast
Enthusiast

Hi everyone,

I’m currently developing a custom pipe support for a mixed metric project. I’m using inches ("in") as the LengthUnit in my script.
Then I created a New Support in the SUPPORTS Catalog based on my script,

I imported the Support to the PipeSupportsSpec in my Imperial Project, everything works perfectly. I can modify parameters like stretching without any issues.
However, when I imported the Support to the PipeSupportsSpec in my Mixed Metric Project, I can not alter the parameters. I've set the ComponentDesignation to "Custom".
I've tried to switch the LengthUnit to "mm" and modify all the values in my script to use mm. But when I placed the support it showed so big shape size (seems converted to an inch unit) in the Plant 3D for the first time. I must alter one of the parameters a bit to trigger the correct shape size.

Has anyone else encountered this issue before? If so, how did you handle custom parts for mixed metric projects? Any insights would be greatly appreciated.

Here I attached my script. 

Need help from Top Solution Authors:
@h_eger 
@Michiel.Valcke 
@quan_hm 
Thank You Guys..


0 Likes
Accepted solutions (1)
744 Views
3 Replies
Replies (3)
Message 2 of 4

h_eger
Mentor
Mentor

@Fahad_Ghoerobi ,

 

ALL project configurations with Python Script supports work for me.
Enclosed are the two Mixed Metric in imperial and metric units

 

21-08-2024_07-36-59.jpg21-08-2024_07-40-23.jpg

-

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

Hartmut Eger
Senior Engineer
Anlagenplanung + Elektotechnik
XING | LinkedIn

EESignature



0 Likes
Message 3 of 4

h_eger
Mentor
Mentor

@Fahad_Ghoerobi ,

 

I do not know the background of your P3D Python script training but this line will not work
Calculations in def will not work

def PSB01_A(s, OD=1.9, Lt=200.0/25.4, tt=1.0/25.4, tp=0.0/25.4, ID="PSB01_A", **kw):

 

-

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

Hartmut Eger
Senior Engineer
Anlagenplanung + Elektotechnik
XING | LinkedIn

EESignature



0 Likes
Message 4 of 4

Fahad_Ghoerobi
Enthusiast
Enthusiast
Accepted solution

Thank you for identifying the problem.

However, After I deleted those calculations, the result remained the same—I still can't modify the parameters in 3D.

For now, my workaround is to adjust the script and use millimeters (mm) as the length unit. Then, I created a new support in my Support Metric Catalog and added it to my Pipe Support Spec in my Mixed Metric Project, and that resolved the issue.

0 Likes