프로그램/C#(autocad)

[Error]Elock Violation

dongchul74 2010. 11. 2. 22:03

C#을 이용해 AutoCad 프로그램을 작성중에 "eLock Violation" Error가 발생했습니다.

Debug가 쉽지 않고, C#에 능숙하지 않기 때문에 무슨 문제인지 한참 찾았습니다.

 

문제는 Window Modal Dialog을 띄우는 과정에 있었습니다.

처음에는 일반적인 코드처럼 Window Modal Dialog를 띄웠습니다.

 

BoxInput bi=new BoxInput();

bi.Show();

 

인터넷의 discuss group에 아래 같은 답이 있더군요.

modal dialog as default works with current database, but if you want to modify another one you have to use lock.

modeless dialog can work with any database you want. there is no default one. so, you must use lock.

 

AutoCAD.NET API Training Labs에 보면 아래와 같이 Modal Dialog를 띄운다고 나와있습니다.

 

BoxInput bi=new BoxInput();

Autodesk.AutoCAD.ApplicationServices.Application.ShowModalDialog(bi);

'프로그램 > C#(autocad)' 카테고리의 다른 글

명령창[command window] 띄우기  (0) 2014.08.05
Zoom Extents  (0) 2012.01.20
C#을 이용하여 Command 창에 명령  (0) 2012.01.16
autocad dimension 시스템 변수  (0) 2011.11.30
[스크랩] AutoCAD 시스템 변수  (0) 2011.06.21