개정판 b7a29053
dev issue #498 : OPC Attribute 처리
Change-Id: I275fe7dac7a400aed746dfa1d1a4d28d0ae8ff68
DTI_PID/SPPIDConverter/OPC/AutoModeling_OPC.cs | ||
---|---|---|
33 | 33 |
string fromOPCModelId; |
34 | 34 |
string toOPCModelId; |
35 | 35 |
string toDrawingName; |
36 |
List<string[]> toOPCAttributes; |
|
36 | 37 |
|
37 |
public AutoModeling_OPC(dynamic application, Ingr.RAD2D.Application radApp, string fromOPCModelId, string toOPCModelId, string toDrawingName) |
|
38 |
public AutoModeling_OPC(dynamic application, Ingr.RAD2D.Application radApp, string fromOPCModelId, string toOPCModelId, string toDrawingName, List<string[]> toOPCAttributes)
|
|
38 | 39 |
{ |
39 | 40 |
this.application = application; |
40 | 41 |
this.radApp = radApp; |
41 | 42 |
this.fromOPCModelId = fromOPCModelId; |
42 | 43 |
this.toOPCModelId = toOPCModelId; |
43 | 44 |
this.toDrawingName = toDrawingName; |
45 |
this.toOPCAttributes = toOPCAttributes; |
|
44 | 46 |
} |
45 | 47 |
|
46 | 48 |
public bool Run() |
... | ... | |
106 | 108 |
} |
107 | 109 |
|
108 | 110 |
if (newOPC != null) |
111 |
{ |
|
109 | 112 |
result = true; |
113 |
foreach (var attribute in toOPCAttributes) |
|
114 |
{ |
|
115 |
LMAAttribute _attribute = newOPC.Attributes[attribute[0]]; |
|
116 |
if (_attribute != null) |
|
117 |
_attribute.set_Value(attribute[1]); |
|
118 |
} |
|
119 |
newOPC.Commit(); |
|
120 |
} |
|
110 | 121 |
|
111 | 122 |
ReleaseCOMObjects(newOPC); |
112 | 123 |
newOPC = null; |
내보내기 Unified diff