개정판 7aee331b
dev issue #000 : filter 사용으로 drawing, inconsistancy 준비
Change-Id: Ib62094741ad319f0a577917c8f6f329dbfeff649
DTI_PID/SPPIDConverter/ConverterDocking.cs | ||
---|---|---|
160 | 160 |
} |
161 | 161 |
} |
162 | 162 |
|
163 |
|
|
164 | 163 |
private void btnGetDrawingSize_Click(object sender, EventArgs e) |
165 | 164 |
{ |
166 | 165 |
if (radApp.ActiveSelectSet.Count > 0) |
... | ... | |
190 | 189 |
|
191 | 190 |
private void simpleButton1_Click(object sender, EventArgs e) |
192 | 191 |
{ |
192 |
Placement _placement = new Placement(); |
|
193 |
LMADataSource dataSource = _placement.PIDDataSource;//placement.PIDDataSource; |
|
194 |
LMInconsistencies co = new LMInconsistencies(); |
|
193 | 195 |
|
194 |
foreach (var item1 in radApp.ActiveDocument.ActiveSheet.Symbols) |
|
195 |
{ |
|
196 |
foreach (var attributes in item1.AttributeSets) |
|
197 |
{ |
|
198 |
foreach (var att in attributes) |
|
199 |
{ |
|
200 |
if (att.Name == "ModelID") |
|
201 |
{ |
|
202 |
string modelItemID = att.GetValue().ToString(); |
|
203 |
} |
|
204 |
} |
|
205 |
} |
|
206 |
} |
|
196 |
LMAFilter filter = new LMAFilter(); |
|
197 |
LMACriterion criterion = new LMACriterion(); |
|
198 |
filter.ItemType = "Drawing"; |
|
199 |
criterion.SourceAttributeName = "Name"; |
|
200 |
criterion.Operator = "="; |
|
201 |
criterion.set_ValueAttribute("11111"); |
|
202 |
filter.get_Criteria().Add(criterion); |
|
207 | 203 |
|
208 |
foreach (var item1 in radApp.ActiveDocument.ActiveSheet.AllDependencyObjects) |
|
209 |
{ |
|
210 |
foreach (var attributes in item1.AttributeSets) |
|
211 |
{ |
|
212 |
foreach (var att in attributes) |
|
213 |
{ |
|
214 |
if (att.Name == "ModelID") |
|
215 |
{ |
|
216 |
string modelItemID = att.GetValue().ToString(); |
|
217 |
} |
|
218 |
} |
|
219 |
} |
|
220 |
} |
|
204 |
LMDrawings drawings = new LMDrawings(); |
|
205 |
drawings.Collect(dataSource, Filter: filter); |
|
221 | 206 |
|
222 |
return; |
|
223 |
Placement _placement = new Placement(); |
|
224 |
LMADataSource dataSource = new LMADataSource();//placement.PIDDataSource; |
|
207 |
LMDrawing currentDrawing = ((dynamic)drawings).Nth(1); |
|
225 | 208 |
|
226 |
_LMAItem item = _placement.PIDCreateItem(@"\Piping\Routing\Process Lines\Primary Piping.sym"); |
|
227 |
PlaceRunInputs placeRunInputs = new PlaceRunInputs(); |
|
228 |
placeRunInputs.AddPoint(0, 0); |
|
229 |
placeRunInputs.AddPoint(0.01, 0); |
|
230 |
placeRunInputs.AddPoint(0.01, -0.01); |
|
231 |
LMConnector cc = _placement.PIDPlaceRun(item, placeRunInputs); |
|
232 | 209 |
|
233 |
_LMAItem item2 = _placement.PIDCreateItem(@"\Piping\Routing\Process Lines\Primary Piping.sym"); |
|
234 |
PlaceRunInputs placeRunInputs2 = new PlaceRunInputs(); |
|
235 |
placeRunInputs2.AddPoint(0.02, 0); |
|
236 |
placeRunInputs2.AddConnectorTarget(cc, 0.01, 0); |
|
237 |
LMConnector cc2 =_placement.PIDPlaceRun(item2, placeRunInputs2); |
|
238 | 210 |
|
211 |
//_LMAItem item = _placement.PIDCreateItem(@"\Piping\Routing\Process Lines\Primary Piping.sym"); |
|
212 |
//PlaceRunInputs placeRunInputs = new PlaceRunInputs(); |
|
213 |
//placeRunInputs.AddPoint(0, 0); |
|
214 |
//placeRunInputs.AddPoint(0.01, 0); |
|
215 |
//placeRunInputs.AddPoint(0.01, -0.01); |
|
216 |
//LMConnector cc = _placement.PIDPlaceRun(item, placeRunInputs); |
|
239 | 217 |
|
218 |
//_LMAItem item2 = _placement.PIDCreateItem(@"\Piping\Routing\Process Lines\Primary Piping.sym"); |
|
219 |
//PlaceRunInputs placeRunInputs2 = new PlaceRunInputs(); |
|
220 |
//placeRunInputs2.AddPoint(0.02, 0); |
|
221 |
//placeRunInputs2.AddConnectorTarget(cc, 0.01, 0); |
|
222 |
//LMConnector cc2 =_placement.PIDPlaceRun(item2, placeRunInputs2); |
|
240 | 223 |
|
224 |
//_LMAItem item3 = _placement.PIDCreateItem(@"\Piping\Routing\Process Lines\Primary Piping.sym"); |
|
225 |
//PlaceRunInputs placeRunInputs3 = new PlaceRunInputs(); |
|
226 |
//placeRunInputs3.AddPoint(0.01, 0.01); |
|
227 |
//if (cc2.ConnectItem1SymbolObject != null) |
|
228 |
//{ |
|
229 |
// placeRunInputs3.AddSymbolTarget(cc2.ConnectItem1SymbolObject, 0.01, 0); |
|
230 |
//} |
|
231 |
//else if (cc2.ConnectItem2SymbolObject != null) |
|
232 |
//{ |
|
233 |
// placeRunInputs3.AddSymbolTarget(cc2.ConnectItem2SymbolObject, 0.01, 0); |
|
234 |
//} |
|
241 | 235 |
|
242 |
|
|
243 |
_LMAItem item3 = _placement.PIDCreateItem(@"\Piping\Routing\Process Lines\Primary Piping.sym"); |
|
244 |
PlaceRunInputs placeRunInputs3 = new PlaceRunInputs(); |
|
245 |
placeRunInputs3.AddPoint(0.01, 0.01); |
|
246 |
if (cc2.ConnectItem1SymbolObject != null) |
|
247 |
{ |
|
248 |
placeRunInputs3.AddSymbolTarget(cc2.ConnectItem1SymbolObject, 0.01, 0); |
|
249 |
} |
|
250 |
else if (cc2.ConnectItem2SymbolObject != null) |
|
251 |
{ |
|
252 |
placeRunInputs3.AddSymbolTarget(cc2.ConnectItem2SymbolObject, 0.01, 0); |
|
253 |
} |
|
254 |
|
|
255 |
_placement.PIDPlaceRun(item3, placeRunInputs3); |
|
236 |
//_placement.PIDPlaceRun(item3, placeRunInputs3); |
|
256 | 237 |
|
257 | 238 |
} |
239 |
|
|
258 | 240 |
[DllImport("user32.dll")] |
259 | 241 |
public static extern int FindWindow(string lpClassName, string lpWindowName); |
260 | 242 |
|
내보내기 Unified diff