Plot area to be moved

Plot area to be moved

Anonymous
Not applicable
1,016 Views
2 Replies
Message 1 of 3

Plot area to be moved

Anonymous
Not applicable

I set the properties for plotting like this

			es = pPlotSettingsValidator->setPlotCfgName(pLayout, sPrinterPath);	
			if (Acad::eOk != es) acutPrintf(L"\n setPlotCfgName: %s\n", acadErrorStatusText(es));
			es = pPlotSettingsValidator->setCurrentStyleSheet(pLayout, strSheetStyle);	
			if (Acad::eOk != es) acutPrintf(L"\n setCurrentStyleSheet: %s\n", acadErrorStatusText(es));
			es = pPlotSettingsValidator->setPlotCentered(pLayout, true);	//居中打印
			if (Acad::eOk != es) acutPrintf(L"\n setPlotCentered: %s\n", acadErrorStatusText(es));
			es = pPlotSettingsValidator->setPlotWindowArea(pLayout, ptMin.x, ptMin.y, ptMax.x, ptMax.y); 
			if (Acad::eOk != es) acutPrintf(L"\n setPlotWindowArea: %s\n", acadErrorStatusText(es));
			es = pPlotSettingsValidator->setPlotType(pLayout, AcDbPlotSettings::kWindow);
			if (Acad::eOk != es) acutPrintf(L"\n setPlotType: %s\n", acadErrorStatusText(es));

but in some dwg-files, the real plotting area has a offset to the area defined by ptMIn and ptMax, like the pic shows. The continuous areas are defined by ptMins and ptMaxs, and the dashed area are the CAD actually plot.

How can I remove this offset?

QQ截图20170329095722.png

0 Likes
Accepted solutions (1)
1,017 Views
2 Replies
Replies (2)
Message 2 of 3

Alexander.Rivilis
Mentor
Mentor
Accepted solution

You have to translate coordinats from WCS (or UCS) to DCS with acedTrans function.

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

0 Likes
Message 3 of 3

Anonymous
Not applicable

Thank you very much, it works.

 

And may be it's better for the document to point out the DCS int the function:

AcDbPlotSettingsValidator::setPlotWindowArea Function

virtual Acad::ErrorStatus
setPlotWindowArea(
AcDbPlotSettings* pPlotSet,
const double xmin,
const double ymin,
const double xmax,
const double ymax) = 0;

pPlotSet Input pointer to AcDbPlotSettings object 
xmin Input lower left x-coordinate of window 
ymin Input lower left y-coordinate of window 
xmax Input upper right x-coordinate of window 
ymax Input upper right y-coordinate of window 

If a plot type of kWindow is selected, then these coordinates define the portion of the layout to plot. The arguments specify the two points in paperspace positioned on the output media.
0 Likes