프로젝트

일반

사용자정보

개정판 932933ed

ID932933edbd9b3d89a087e75cccc9be05eaa7c4d3
상위 ff4941b2
하위 697d4c61

gaqhf 이(가) 약 5년 전에 추가함

dev issue #1230 : Linenumber modeling

Change-Id: I15a1e7458d6b0f76032dbad0e1d4a48aeba9bf15

차이점 보기:

DTI_PID/APIDConverter/AutoModeling.cs
100 100
            try
101 101
            {
102 102
                SplashScreenManager.ShowForm(typeof(APIDSplashScreen), true, true);
103
                SplashScreenManager.Default.SendCommand(APIDSplashScreen.SplashScreenCommand.SetAllStepCount, 2);
103
                SplashScreenManager.Default.SendCommand(APIDSplashScreen.SplashScreenCommand.SetAllStepCount, 3);
104 104
                SplashScreenManager.Default.SendCommand(APIDSplashScreen.SplashScreenCommand.SetDocumentName, document.AvevaDrawingNumber + document.AvevaSheetNumber);
105
                SplashScreenManager.Default.SendCommand(APIDSplashScreen.SplashScreenCommand.SetParent, Autodesk.AutoCAD.ApplicationServices.Application.MainWindow.Handle);
106

  
105 107
                SetConvertRule();
106 108

  
107 109
                RunLineModeling();
108 110
                RunOPCModeling();
109 111
                RunSymbolModeling();
112

  
113

  
110 114
            }
111 115
            catch (System.Exception ex)
112 116
            {
......
114 118
            }
115 119
            finally
116 120
            {
121
                SplashScreenManager.Default.SendCommand(APIDSplashScreen.SplashScreenCommand.ClearParent, null);
117 122
                SplashScreenManager.CloseForm(false);
118 123
            }
119 124
        }
......
163 168
            GetConnectedGroupLine(line, groupLine, false);
164 169
            GetGroupLinePoints(groupLine, points);
165 170

  
171
            LineNumber lineNumber = null;
172
            if (line.Aveva.Type == Model.Type.Pipe)
173
            {
174
                foreach (var item in groupLine)
175
                {
176
                    lineNumber = document.LINENUMBERS.Find(x => x.CONNLINE == item.UID);
177
                    if (lineNumber != null)
178
                    {
179
                        GUIUtils.SetAutoLabelCheck(true);
180
                        break;
181
                    }
182
                }
183
            }
184

  
185

  
166 186
            long handle = 0;
167 187
            if (line.Aveva.Type == Model.Type.Pipe)
168
                handle = DrawPipe(line.Aveva.Name, points);
188
                handle = DrawPipe(line.Aveva.Name, points, lineNumber);
169 189
            else if (line.Aveva.Type == Model.Type.Signal)
170 190
                handle = DrawSignal(line.Aveva.Name, points);
171 191

  
192
            if (lineNumber != null)
193
                GUIUtils.SetAutoLabelCheck(false);
194

  
172 195
            foreach (var item in groupLine)
173 196
                item.Aveva.Handle = handle;
174 197
        }
......
200 223
        #endregion
201 224

  
202 225
        #region Drawing Method
203
        private long DrawPipe(string style, List<string> coordinates)
226
        private long DrawPipe(string style, List<string> coordinates, LineNumber lineNumber = null)
204 227
        {
205 228
            List<long> prevHandles = GetAllGroupHandles();
206 229

  
......
213 236
            //coordinate
214 237
            foreach (var item in coordinates)
215 238
                commandParam.Add(item);
216
            //enter
217
            commandParam.Add(null);
218
            //enter
239

  
240
            //enter Parent(null)
219 241
            commandParam.Add(null);
220 242

  
243
            if (lineNumber != null)
244
            {
245
                Point3d point = new Point3d(lineNumber.Aveva.X, lineNumber.Aveva.Y, 0);
246
                commandParam.Add(point);
247
                commandParam.Add(lineNumber.ANGLE);
248

  
249
                commandParam.Add(null);
250
            }
251
            else
252
                commandParam.Add(null);
253

  
221 254
            editor.Command(commandParam.ToArray());
222 255

  
223 256
            List<long> newHandles = GetAllGroupHandles();
......
675 708
            //InitGUI();
676 709
            //DrawSignal("SONIC", new List<string>() { "2,100", "100,100" });
677 710

  
678
            DrawPipe("Main Pipe", new List<string>() { "2,100", "100,100" });
711
            DrawPipe("Main Pipe", new List<string>() { "2,100", "100,100" }, null);
712
            return;
679 713
            Symbol symbol = new Symbol();
680 714
            symbol.Aveva = new AvevaSymbolInfo();
681 715
            symbol.Aveva.Name = "INVB";

내보내기 Unified diff

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