2017-03-12 6 views
0

안녕하세요 저는 도면을 생성하고 dwg/png/pdf를 내보내는 맞춤형 앱을 사용하고 있습니다. Autocad 2016의 로컬 테스트는 좋지만 활동을 업로드 할 때 서버는 pdf를 내보낼 수 없습니다.DWG에서 PDF로 오토 데스크 디자인 오토메이션

db.SaveAs(dwgOut, DwgVersion.Current); 
ed.Command("_pngout", pngOut, ""); 
ed.Command("_tilemode", "0"); 
ed.Command("_-export", "_pdf", "C", "N", pdfOut);` 

핵심 엔진 v21입니다.

AIO 보고서 :

[03/12/2017 09:38:38] Command: _Customtest 
[03/12/2017 09:38:38] Specify parameter file: params.json 
[03/12/2017 09:38:38] Specify output folder: outputs 
[03/12/2017 09:38:38] Regenerating layout. 
[03/12/2017 09:38:38] Regenerating layout. 
[03/12/2017 09:38:38] Regenerating model - caching viewports. 
[03/12/2017 09:38:38] _pngout Enter file name <C:\Aces\Jobs\59ac1762d7c84db5a109ad8278685e7f\CustomtestTemplate.png>: outputs\test.png Select objects or <all objects and viewports>: _tilemode 
[03/12/2017 09:38:38] Enter new value for TILEMODE <0>: 0 _-export Enter file format [Dwf/dwfX/Pdf] <dwfX>_pdf Enter plot area [Current layout/All layouts]<Current Layout>: C Detailed plot configuration? [Yes/No] <No>: N 
[03/12/2017 09:38:38] Layout not foundCoreHeartBeat 
[03/12/2017 09:38:38] Enter file name <CustomtestTemplate-NewLayout.pdf>: outputs\test.pdf 
[03/12/2017 09:38:38] Command: _.quit 

이 '레이아웃되지는 ​​foundCoreHeartBeat', ... 모든 팁 이상한하시기 바랍니다인가? 고맙습니다!

편집 : 가 나는 또한

ed.Command("_-export", "_pdf", "_C", "N", pdfOut);` 

을 시도했다.

나는

   ed.Command("_pngout", pngOut, ""); 
       ed.Command("_tilemode", "1"); 
       ed.Command("_.ZOOM", "_E"); 
       ed.Command("_-export", "_pdf", "d", "n", pdfOut); 

예, 파일을 PNG로하는 레이아웃을 반영하지만 우리는 PDF로 레이아웃을 풀 모델 공간에서 PDF를 인쇄로 변경되었습니다. 이 지역의 성공을 시험했다, 잘, 수출에 대한 코드를 조정

var id = LayoutManager.Current.CreateAndMakeLayoutCurrent("testLayout"); 

그래서 우리가 레이아웃을 생성 부분에서 주석 :

우리는 우리가 도면 공간에 새로운 레이아웃을 만든에서 문제가 될 줄 알았는데 :

   ed.Command("_pngout", pngOut, ""); 
       ed.Command("_tilemode", "0"); 
       ed.Command("_-export", "_pdf", "c", "n", pdfOut); 

다시 PDF 파일이 없습니다. 그러나 이번에는 보고서가 변경되었습니다.

[03/12/2017 23:47:13] Command: _Customtest 
[03/12/2017 23:47:13] Specify parameter file: params.json 
[03/12/2017 23:47:13] Specify output folder: outputs 
[03/12/2017 23:47:13] _pngout Enter file name <C:\Aces\Jobs\b7b5c7d991f047df90fcbe33e80d0a86\CustomtestTemplate.png>: outputs\test.png Select objects or <all objects and viewports>: _tilemode 
[03/12/2017 23:47:13] Enter new value for TILEMODE <1>: 0 Regenerating layout. 
[03/12/2017 23:47:13] Regenerating layout. 
[03/12/2017 23:47:13] Regenerating model - caching viewports. 
[03/12/2017 23:47:13] _-export Enter file format [Dwf/dwfX/Pdf] <dwfX>_pdf Enter plot area [Current layout/All layouts]<Current Layout>: c Detailed plot configuration? [Yes/No] <No>: n 
[03/12/2017 23:47:13] There were no plottable sheets in the current operation.Enter file name <CustomtestTemplate-Layout1.pdf>: outputs\test.pdf 
[03/12/2017 23:47:13] Command: _.quit 

이제 '현재 작업에 플롯 시트가 없습니다'.

답변

0

"C"를 "_C"로 변경해 보셨습니까?

+0

내가 편집 한 내용을 참조하십시오. 앨버트 감사합니다. – Bob

+0

이 문제를 재현 할 수 없습니다. 내가하고있는 일을하기 위해 앱을 만들었습니다. https://github.com/szilvaa/design.automation-net-custom.activity.sample 문제가 특정 드로잉 인 것 같습니다. –

+0

알버트를 보내 주셔서 감사합니다! 당신은 아마도 맞을 것입니다 ... 나는 다른 리소스 파일로 바뀌었고, 보고서는 모든 종류의 재미있는 방법을 보여줬습니다. 그것으로 파고 들어 ... – Bob