프로젝트

일반

사용자정보

개정판 f28a350a

IDf28a350ac026a09613d87b54a96424396189ec22
상위 5d2d88ca
하위 04f515d0, 360fd516

백흠경이(가) 5년 이상 전에 추가함

issue #663: setCurrentPidSource method 제거로 인한 오류 수정

Change-Id: Ia7c67a83ae51228dee1d13344dc300a3f10302bd

차이점 보기:

DTI_PID/SPPIDConverter/ConverterDocking.cs
213 213
        #region TEST
214 214
        private void simpleButton1_Click(object sender, EventArgs e)
215 215
        {
216
            //foreach (RADObject item in application.ActiveDocument.ActiveSheet.DrawingObjects)
217
            //{
218
            //    DependencyObject dependencyObject = item as DependencyObject;
219
            //    if (dependencyObject != null)
220
            //    {
221
            //        foreach (var attributes in dependencyObject.AttributeSets)
222
            //        {
223
            //            foreach (var attribute in attributes)
224
            //            {
225
            //                if (!DBNull.Value.Equals(attribute.GetValue()) && attribute.GetValue() != null && attribute.GetValue().ToString() == "40E2CDE9781940089C37258D37FA3BCD")
226
            //                {
227
            //                    application.ActiveSelectSet.Add(item);
228
            //                }
229
            //            }
230
            //        }
231
            //    }
232
            //}
233

  
234
            Placement placement = new Placement();
235
            LMADataSource dataSource = placement.PIDDataSource;
236

  
237
            LMModelItem modelItem = dataSource.GetModelItem("16C45380E2EB4818A6A9BFE11F0228DE");
238
            LMPipeRun pipeRun = dataSource.GetPipeRun("16C45380E2EB4818A6A9BFE11F0228DE");
239
            LMSymbol symbol = dataSource.GetSymbol("F454BD9CC87C4C3AAE8282F2AB10B7E0");
240
            string symbolPath = string.Empty;
241
            if (modelItem != null)
216
            foreach (RADObject item in application.ActiveDocument.SelectSet)
242 217
            {
243
                foreach (LMRepresentation rep in modelItem.Representations)
218
                DependencyObject dependencyObject = item as DependencyObject;
219
                if (dependencyObject != null)
244 220
                {
245
                    if (!DBNull.Value.Equals(rep.get_FileName()) && !string.IsNullOrEmpty(rep.get_FileName()))
246
                    {
247
                        symbolPath = rep.get_FileName();
248
                        string newFileName = @"\Piping\Routing\Process Lines\Secondary Piping.sym";
249
                        if (symbolPath != newFileName)
250
                        {
251

  
252
                            //symbol.set_FileName(newFileName);
253
                            placement.PIDReplaceSymbol(newFileName, ref symbol);
254
                            symbol.Commit();
255
                            //rep.set_FileName(newFileName);
256
                            //rep.Commit();
257
                            
258
                        }
259
                        break;
260
                    }
221
                    double minX = 0;
222
                    double minY = 0;
223
                    double maxX = 0;
224
                    double maxY = 0;
225
                    dependencyObject.DrawingObjects[0].Range(out minX, out minY, out maxX, out maxY);
226
                }
227
                Symbol2d symbol2D = item as Symbol2d;
228
                if (symbol2D != null)
229
                {
230
                    double minX = 0;
231
                    double minY = 0;
232
                    double maxX = 0;
233
                    double maxY = 0;
234
                    symbol2D.Range(out minX, out minY, out maxX, out maxY);
261 235
                }
262 236
            }
263 237

  
238

  
239

  
264 240
            return;
265 241
            Thread outThread = new Thread(func2 =>
266 242
            {

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)