Parameters of the custom valve(using python script) does not appear on the Properties of 3D

Parameters of the custom valve(using python script) does not appear on the Properties of 3D

hyrro_velasquez
Advocate Advocate
1,678 Views
5 Replies
Message 1 of 6

Parameters of the custom valve(using python script) does not appear on the Properties of 3D

hyrro_velasquez
Advocate
Advocate

Good day Ma'am/Sir,

I'm just wondering if anyone here knows the reason why my parameters that set on my python script does not show on the property of the valve. the valve does not contain any error when placed on the pipe, I just really need to show the valve parameters on the "part properties" so that I can change some dimension of the valve after I placed it on the pipe.

below is my python script:

from aqa.math import *
from varmain.primitiv import *
from varmain.custom import *
@Anonymous(Group="Valve", TooltipShort="VALVE_X8", TooltipLong="VALVE_X8", LengthUnit="mm", Ports=2)
@group("MainDimensions")
@param(Par_D1=LENGTH, TooltipLong="Outside diameter of the flange")
@param(Par_D2=LENGTH, TooltipLong="Outside diameter of the flange")
@param(Par_H1=LENGTH, TooltipLong="Graphics flange Diameter")
@param(Par_H2=LENGTH, TooltipLong="Graphics flange Diameter")
@param(Par_B1=LENGTH, TooltipLong="Graphics flange thickness")
@param(Par_B2=LENGTH, TooltipLong="Graphics flange thickness")
@param(Par_L=LENGTH, TooltipLong="Total Length of flange")
def VALVE_X8(s, Par_D1 = 168.3, Par_D2 = 168.3, Par_H1 = 300.0, Par_H2 = 300.0, Par_B1 = 28.0, Par_B2 = 28.0, Par_L = 841.5,ID = 'VALVE_X8',**kw):
#VALVE
  FLG1 = CYLINDER(s, R=Par_H1/2.0,H=Par_B1,O=Par_D1/2.0).rotateX(0).rotateX(270).translate((0.0,0.0,0.0))
  FLG2 = CONE(s, R1=Par_H1/2.0, R2=Par_H1/20.0, H=Par_L/2.0 - Par_B1, E=0).rotateX(270).translate((0.0,Par_B1,0.0))
  FLG3 = CYLINDER(s, R=Par_H2/2,H=Par_B2,O=Par_D2/2.0).rotateX(0).rotateX(90).translate((0.0,Par_L,0.0))
  FLG4 = CONE(s, R1=Par_H2/2.0, R2=Par_H2/20.0, H=Par_L/2.0 - Par_B2, E=0).rotateX(90).translate((0.0,(Par_L/2.0 - Par_B2) + Par_L/2.0,0.0)) 
#port points
  s.setPoint((0.0, 0.0, 0.0),(0.0, -1, 0.0))
  s.setPoint((0.0, Par_L, 0.0),(0.0, 1, 0.0))
  #s.setLinearDimension('Par_L',(0, 0, 0),(0, Par_L/2, 0))
  return

 

 

 I  add also a screen shot of the valve property

thank you so much Ma'am/Sir.

0 Likes
1,679 Views
5 Replies
Replies (5)
Message 2 of 6

h_eger
Mentor
Mentor

Dear @hyrro_velasquez ,

 

May I ask which values you would like to see in the "Part Properties" category?
This is the result of a custom valve

2020-11-16_09-09-06.png

-

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 6

hyrro_velasquez
Advocate
Advocate

Dear Sir Hartmut Eger,

Thank you very much for responding to my problem, I wanna display the dimension of the custom valve I created just like your screenshot, but correct me if I'm wrong, does the custom valve on you screen shot is from the "CustomParts Metric Catalog"? under Valve Component Category?. because as per my testing when I get a valve from "CustomParts Metric Catalog" and add it on my specs and place it inside Plant3D it contains the dimension under "Part Properties", Hence when I add my custom valve that I created using python script on my spec, and place it inside Plant 3D, it does not show any dimension/parameters that I set on my python script like D1,D2,L etc.. My target is to show the dimensions also of my python script valve under "Part Properties",  if you have other information I will greatly appreciate it. again thank you so much.

0 Likes
Message 4 of 6

h_eger
Mentor
Mentor

Dear @hyrro_velasquez ,

 

I think that the link gives information on how to change something so that your result is fulfilled.

 

https://in-the-pipes.typepad.com/in_the_pipes/2017/12/index.html 

-

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 5 of 6

hyrro_velasquez
Advocate
Advocate

Dear Sir Hartmut Eger,

 

Again thank you so much for your reply, regards to the link you give, I tested it but Unfortunately the column "Component Designation" does not exist on my Data manager, but upon trying to find answers I try to export my spec data to excel file, after that I check the python valve sheet if it contains the column "Component Designation", and it does, so I try to set its value to Custom or Parametric, then I imported my excel data back to spec editor and accept all changes done in the excel worksheet. But unfortunately when I placed again my python custom valve, the  "Dimensions" under "Parts geometry" in "Part Properties" still does not show. I really need this parts geometry to be shown since the dimension of our valves need to be inputted manually base on projects specification.

I tried to search on youtube but no information pertaining to this issue.

Again thank you so much I really appreciate your reply.

below pic is my unsuccessful output, the other picture is from the link you gave me which is my target output.DimensionsParameters.PNG

Part Geometry dimensions.PNG

0 Likes
Message 6 of 6

h_eger
Mentor
Mentor

Dear @hyrro_velasquez ,

 

I have just spoken to a colleague and we agree that the design parameters of all parts are NOT stored in the database.
The design parameters of the parts are only saved in the object in the drawing.

-

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