hytos / DTI_PID / AutoSPPID / AutoSPPID.vb @ 4f359afa
이력 | 보기 | 이력해설 | 다운로드 (3.49 KB)
1 |
Imports Llama |
---|---|
2 |
Imports Plaice |
3 |
|
4 |
|
5 |
Public Class AutoSPPID |
6 |
Dim objPlacement = New Placement |
7 |
Public Sub TestPipe() |
8 |
Dim datasource As LMADataSource |
9 |
datasource = objPlacement.PIDDataSource |
10 |
Dim PipeRunLocation As String |
11 |
Dim objItem As LMAItem |
12 |
|
13 |
Dim objConnector As LMConnector |
14 |
Dim objInputs As PlaceRunInputs |
15 |
Dim objSymbol As LMSymbol |
16 |
Dim ValveLocation As String |
17 |
PipeRunLocation = "\Piping\Routing\Process Lines\Primary Piping.sym" |
18 |
objInputs = New PlaceRunInputs |
19 |
objInputs.AddPoint(0.1, 0.1) |
20 |
objInputs.AddPoint(0.2, 0.1) |
21 |
objItem = objPlacement.PIDCreateItem(PipeRunLocation) |
22 |
objConnector = objPlacement.PIDPlaceRun(objItem, objInputs) |
23 |
Dim objPipeRun As LMPipeRun = datasource.GetPipeRun(objConnector.ModelItemID) |
24 |
|
25 |
objPipeRun.Attributes("OperFluidCode").Value = "AFS" |
26 |
objPipeRun.Attributes("InsulThick").Value = "25" |
27 |
objPipeRun.Attributes("NominalDiameter").Value = "6""" |
28 |
objPipeRun.Attributes("PipeRunClass").Value = "Piping" |
29 |
objPipeRun.Attributes("pipingmaterialsclass").Value = "NA1S" |
30 |
objPipeRun.Commit() |
31 |
|
32 |
ValveLocation = "\Piping\Valves\2 Way Common\Ball Valve.sym" |
33 |
objSymbol = objPlacement.PIDPlaceSymbol(ValveLocation, 0.15, 0.3, , 1.57) |
34 |
objInputs = New PlaceRunInputs |
35 |
objInputs.AddConnectorTarget(objConnector, 0.15, 0.1) |
36 |
objInputs.AddPoint(0.15, 0.15) |
37 |
objInputs.AddPoint(0.12, 0.15) |
38 |
objInputs.AddPoint(0.12, 0.2) |
39 |
objInputs.AddPoint(0.15, 0.2) |
40 |
objInputs.AddSymbolTarget(objSymbol, 0.15, 0.3) |
41 |
objItem = objPlacement.PIDCreateItem(PipeRunLocation) |
42 |
objConnector = objPlacement.PIDPlaceRun(objItem, objInputs) |
43 |
objPipeRun = datasource.GetPipeRun(objConnector.ModelItemID) |
44 |
objPipeRun.Attributes("flowdirection").Value = "End 1 is downstream (Outlet)" |
45 |
objPipeRun.Attributes("SP_JDesignMaxTemp").Value = "-273.15" |
46 |
objPipeRun.Attributes("SP_JAltDesignMaxTemp").Value = "-273.15" |
47 |
objPipeRun.Commit() |
48 |
|
49 |
objInputs = New PlaceRunInputs |
50 |
objInputs.AddSymbolTarget(objSymbol, 0.15, 0.304) |
51 |
' objInputs.AddPoint(0.15, 0.304) |
52 |
objInputs.AddPoint(0.15, 0.33) |
53 |
objInputs.AddPoint(0.2, 0.33) |
54 |
objInputs.AddPoint(0.2, 0.25) |
55 |
objInputs.AddSymbolTarget(objSymbol, 0.2765, 0.25) |
56 |
objItem = objPlacement.PIDCreateItem(PipeRunLocation) |
57 |
objConnector = objPlacement.PIDPlaceRun(objItem, objInputs) |
58 |
objPipeRun = datasource.GetPipeRun(objConnector.ModelItemID) |
59 |
objPipeRun.Attributes("flowdirection").Value = "End 1 is downstream (Outlet)" |
60 |
objPipeRun.Attributes("SP_JDesignMaxTemp").Value = "-273.15 C" |
61 |
objPipeRun.Attributes("SP_JAltDesignMaxTemp").Value = "-273.15 C" |
62 |
' objPipeRun.Attributes("SP_SP_JAltDesignMaxTempSI").Value = "-273.15 C" |
63 |
objPipeRun.Attributes("SP_JAltOperMaxTemp").Value = "-273.15 C" |
64 |
' objPipeRun.Attributes("SP_SP_JAltOperMaxTempSI").Value = "-273.15 C" |
65 |
objPipeRun.Attributes("SP_JDesignMaxTemp").Value = "-273.15 C" |
66 |
' objPipeRun.Attributes("SP_SP_JDesignMaxTempSI").Value = "-273.15 C" |
67 |
objPipeRun.Attributes("SP_JOperMaxTemp").Value = "-273.15 C" |
68 |
' objPipeRun.Attributes("SP_SP_JOperMaxTempSI").Value = "-273.15 C" |
69 |
objPipeRun.Attributes("SP_JTestMaxTemp").Value = "-273.15 C" |
70 |
' objPipeRun.Attributes("SP_SP_JTestMaxTempSI").Value = "-273.15 C" |
71 |
objPipeRun.Commit() |
72 |
|
73 |
End Sub |
74 |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 |
|
81 |
End Class |