I want to export a drawing to PDF using ProPDFExport.
As options I use following code snippet since I want to export a special view:
status = ProPDFoptionsAlloc(&pdfOpt);
status = ProPDFoptionsIntpropertySet(pdfOpt, PRO_PDFOPT_VIEW_TO_EXPORT,PRO_PDF_VIEW_SELECT_BY_NAME);
status = ProPDFoptionsStringpropertySet(pdfOpt,PRO_PDFOPT_SELECTED_VIEW, (wchar_t*)viewNameP);
status = ProPDFExport(drawing, pro_wszPath, pdfOpt);
status = ProPDFoptionsFree(pdfOpt);
at "ProPDFoptionsStringpropertySet(pdfOpt,PRO_PDFOPT_SELECTED_VIEW, (wchar_t*)viewNameP);" I got ProError "Bad Inputs".
So I checked my viewName by using ProViewRetrieve:
status = ProViewRetrieve(drawing, vName, &viewTemp);
To explain: traverse through the dimensions of my ProMdl and ProDrawingViewNameGet works (I get the correct viewName as result). But copying the viewName to vName (ProLine) and then trying to use ProViewRetrieve I get the Error "A general error occurred and the function failed."
Someone any Ideas?
I want to rephrase my question: Is it possible to export views from a drawing as a image (tiff/pdf or something else)?
I found out that PDFoptions is not working for 2D views so I am trying something different:
1) get all Views (ProDrawingViewsCollect)
2) for each view get position (ProDrawingViewOriginGet) and get size (ProDrawingViewOutlineGet)
3) export whole sheet and crop with size and position information.
does someone know how to my last step? I dont know how to handle ProPoint3d data...about the coordiantes I am getting back...
I am not sure whether below will be helpful to you or not:
I'm not sure how to do the cropping either but the function ProDrawingViewOutlineGet outputs the data points in screen coordinates. In what coordinate system to you need the points?
Alternatively you could use ProPDFWithProfileExport and define the .dop xml file to do what you need. I have never used a .dop to export a .PDF but it's worth a look to see what it's capabilities are.