How to create a nozzle in custom equipment peqx and Python scripts

How to create a nozzle in custom equipment peqx and Python scripts

senthilkumar.chandrasekaran6Q55E
Participant Participant
957 Views
6 Replies
Message 1 of 7

How to create a nozzle in custom equipment peqx and Python scripts

senthilkumar.chandrasekaran6Q55E
Participant
Participant

Hi,

 

I'm trying to create custom equipment using python scripts and by creating the required PEQX file. Where I can be able to create the required profile for the custom equipment.

 

But I'm not sure how to add the nozzles to the custom equipment while creating itself. It seems like we need to add some info to the EquipmentType.xml and .py files. And I'm not finding any source or references to do the same. 

Kindly let me know if you are aware of the steps and let me know if any additional info is needed.
Thanks.

0 Likes
958 Views
6 Replies
Replies (6)
Message 2 of 7

h_eger
Mentor
Mentor

@senthilkumar.chandrasekaran6Q55E ,

 

EquipmentType.xml  = find the Nozzle

 

<?xml version="1.0" encoding="utf-8"?>
<EquipmentType 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
	Name="VESSEL-H" 
	Type="F" 
	SubType="H"
	PartSubType="GeneralVessel"
	GUID="{625EBFA5-90EB-4BD2-9271-728C3C578317}"
    PartType="Vessel">
  <DisplayName>@50008</DisplayName>
  <Nozzles>
    <NozzleInfo Name="Nozzle 1" PortIndex="1">
      <DisplayName>Nozzle 1</DisplayName>
      <NozzleTypes />
      <Parameters>
        <ParameterInfo Name="LOC" DefaultValue="1" Type="List" />
        <ParameterInfo Name="R" DefaultValue="0" Type="d0" />
        <ParameterInfo Name="A" DefaultValue="0" Type="a" />
        <ParameterInfo Name="L" DefaultValue="3" Type="d" />
      </Parameters>
      <PortProperties>
        <PropertyInfo Name=".SizeRecordId" DefaultValue="4e77a112-54bb-5aaf-ab95-255acade6937" />
      </PortProperties>
    </NozzleInfo>
    <NozzleInfo Name="Nozzle 2" PortIndex="2">
      <DisplayName>Nozzle 2</DisplayName>
      <NozzleTypes />
      <Parameters>
        <ParameterInfo Name="LOC" DefaultValue="2" Type="List" />
        <ParameterInfo Name="H" DefaultValue="45" Type="d-" />
        <ParameterInfo Name="A" DefaultValue="0" Type="a" />
        <ParameterInfo Name="L" DefaultValue="3" Type="d" />
      </Parameters>
      <PortProperties>
        <PropertyInfo Name=".SizeRecordId" DefaultValue="4e77a112-54bb-5aaf-ab95-255acade6937" />
      </PortProperties>
    </NozzleInfo>
  </Nozzles>
  <PartProperties>
    <PropertyInfo Name="PartSizeLongDesc" DefaultValue="Vessel" />
  </PartProperties>
  <Categories>
    <CategoryInfo Name="EQTORISPHERICHEAD">
      <Parameters>
        <ParameterInfo Name="D" DefaultValue="45" />
      </Parameters>
    </CategoryInfo>
    <CategoryInfo Name="EQCYLINDER">
      <Parameters>
        <ParameterInfo Name="D" DefaultValue="45" />
        <ParameterInfo Name="H" DefaultValue="50" />
      </Parameters>
    </CategoryInfo>
    <CategoryInfo Name="EQTORISPHERICHEAD">
      <Parameters>
        <ParameterInfo Name="D" DefaultValue="45" />
      </Parameters>
    </CategoryInfo>
  </Categories>
</EquipmentType>

 

-

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 7

senthilkumar.chandrasekaran6Q55E
Participant
Participant

Hi @h_eger,

 

Thanks for your reply. If i add one Nozzle to my EquipmentType.xml like above, I'm getting the below error while creating the component.

senthilkumarchandrasekaran6Q55E_0-1738779490171.png

 

Also my current EquipmentType.xml will look like below,
<?xml version="1.0" encoding="utf-8"?>
<EquipmentType
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
Name="TESTVESSEL"
Type="C"
SubType="V"
PartSubType="GeneralVessel"
GUID="{4E1D18D7-85E8-473D-BC05-468AFB98AA0F}"
PartType="Vessel">
<DisplayName>TESTVESSEL</DisplayName>
<PartProperties>
<PropertyInfo Name="PartSizeLongDesc" DefaultValue="TESTVESSEL" />
</PartProperties>
<Parameters>
<ParameterInfo Name="R1" DefaultValue="100" Type="d" />
<ParameterInfo Name="H1" DefaultValue="50" Type="d" />
</Parameters>
<Nozzles>
<NozzleInfo Name="Nozzle 1" PortIndex="1">
<DisplayName>Nozzle 1</DisplayName>
<NozzleTypes />
<Parameters>
<ParameterInfo Name="LOC" DefaultValue="1" Type="List" />
<ParameterInfo Name="R" DefaultValue="0" Type="d0" />
<ParameterInfo Name="A" DefaultValue="0" Type="a" />
<ParameterInfo Name="L" DefaultValue="3" Type="d" />
</Parameters>
<PortProperties>
<PropertyInfo Name=".SizeRecordId" DefaultValue="4e77a112-54bb-5aaf-ab95-255acade6937" />
</PortProperties>
</NozzleInfo>
</Nozzles>
</EquipmentType>

And my .py script file will look like below,

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

@activate(Group="Vessel", TooltipShort="TESTVESSEL", TooltipLong="TESTVESSEL", LengthUnit="mm")
@group("MainDimensions")
@param(R1=LENGTH, TooltipShort="Radius of Cylinder")
@param(H1=LENGTH, TooltipShort="Height of Cylinder")

@group(Name="meaningless enum")
@enum(1, "align X")
@enum(2, "align Y")
@enum(3, "align Z")

def TESTVESSEL (s, R1=2000, H1=1500, ID = 'TESTVESSEL', **kw):

o1 = CYLINDER(s, R=R1, H=H1, O=0.0)
s.setPoint((0, 0, 0), (-1, 0, 0))

Kindly let me know what I'm missing. 

0 Likes
Message 4 of 7

Ivan-apexwater
Contributor
Contributor

Hi all

 

I'm having the same issue with a custom tank script. Is there any paper, PDF, post, or other resource that points toward the solution and clarifies how Plant3D handles nozzles in equipment?
I have checked the same file as h_eger, VerticalTank and VerticalTemplate, but both handle the nozzle in different ways. Any enlightenment?

 

Thanks

 

Ivan

0 Likes
Message 5 of 7

h_eger
Mentor
Mentor

@Ivan-apexwater ,

 

Google never forgets!

 

-

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

Ivan-apexwater
Contributor
Contributor

 Got that one, and I found a few others. I'm even using ChatGPT to find more information about but no luck so far. Still stuck in the same place, same error coming out from Plant3D.
I have tried:
1. Python script with no s.setPoint.
   EquipmentType.xml with Nozzle:

 <Nozzles>
    <NozzleInfo Name="Nozzle 1" PortIndex="1">
      <DisplayName>Nozzle 1</DisplayName>
  <NozzleTypes>
   <NozzleType PartType="Nozzle" PartSubType="StraightNozzle" EndType="FL" />
  </NozzleTypes>
      <Parameters>
        <ParameterInfo Name="LOC" DefaultValue="1" Type="List" />
        <ParameterInfo Name="R" DefaultValue="0" Type="d0" />
        <ParameterInfo Name="A" DefaultValue="0" Type="a" />
        <ParameterInfo Name="L" DefaultValue="3" Type="d" />
      </Parameters>
      <PortProperties>
        <PropertyInfo Name=".SizeRecordId" DefaultValue="2675975F-181A-565A-BD06-A91C2D07FAF6" />
      </PortProperties>
    </NozzleInfo>
  </Nozzles>
2. Python script with  s.setPoint.
   EquipmentType.xml with Nozzle
3. Python script with no  s.setPoint.
   EquipmentType.xml with no Nozzle
The only one that can be deployed in "Create Equipment" is 3, without having the issue (System.NullReferenceException: Object reference not set to an instance of an object.)

0 Likes
Message 7 of 7

jcoaquira04
Explorer
Explorer

TK-01.jpgTK-02.jpgTK-03.jpg

Me salió como indica el manual, pero el detalle es que no cambia el OF en el modelo 3D

0 Likes