ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AcGsView Error: pointer to incomplete class type is not allowed

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
ha62791
612 Views, 2 Replies

AcGsView Error: pointer to incomplete class type is not allowed

"AcGsView *view
Error: pointer to incomplete class type is not allowed"

 

I get this error with the following code in visual studio 2012:

 

static void VCMControl_VCM_START() {

   AcDbDatabase * pDb = acdbHostApplicationServices()->workingDatabase();

   if (!pDb->tilemode()) {
      acutPrintf(_T("This command is only for Model space.\n"));
      return;
   }

 

   resbuf cvport;
   acedGetVar(_T("CVPORT"), &cvport);

   AcGsView *view = acgsGetGsView(cvport.resval.rint, true);
   double aspectRatio = view->fieldWidth() / view->fieldHeight();

}

 

How can I solve it?

2 REPLIES 2
Message 2 of 3
ha62791
in reply to: ha62791

I imported <gs.h> and the problem is gone.

Message 3 of 3
kubitTilo
in reply to: ha62791

By the way - you can omit the tilemode() check by registering your command with the ACRX_CMD_NOPAPERSPACE flag.




Tilo Pfliegner

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost