How to create a custom PaperSpace?

How to create a custom PaperSpace?

Anonymous
Not applicable
984 Views
3 Replies
Message 1 of 4

How to create a custom PaperSpace?

Anonymous
Not applicable

I got the following code from internet.

 

    bool createlayout(AcDbObjectId& layoutId,AcDbObjectId& btrId)
    {
        AcApLayoutManager *pLayerM =(AcApLayoutManager*)acdbHostApplicationServices()->layoutManager();
        TCHAR* nextLayoutName = pLayerM->getNextNewLayoutName(NULL);

        bool bRes = false;
        if (Acad::eOk == pLayerM->createLayout(nextLayoutName, layoutId,btrId))
        {
            pLayerM->setDefaultPlotConfig(btrId);
            pLayerM->setCurrentLayout(nextLayoutName);
            pLayerM->updateLayoutTabs();
            
            bRes = true;
        }
        acutDelString(nextLayoutName);
        return  bRes;

    }

 

  To my surprise, there are no methods like "setPapersize(double dWidth,double dHeight)" from ApLayoutManager or ApLayout. 

  but i want to create a custom size paperspace.  any way to do it?

there is a method "getPlotPaperSize" from AcdbLayout, where is the "setPlotPaerSize"?

0 Likes
985 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable

a custom layout, exactly say.

0 Likes
Message 3 of 4

owenwengerd
Advisor
Advisor

I don't have an answer, but the paper size is correlated with the chosen output device, so likely stored as part of the page setup for the layout.

--
Owen Wengerd
ManuSoft
0 Likes
Message 4 of 4

Anonymous
Not applicable

yes ,the paper size has something to do with the Print device.

0 Likes