cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

retrieving 3d data from a modle

hey

the api stipulates that the following two function calls, ACAPI_3D_GetNum and ACAPI_3D_GetComponent are used to retrieve the data from archiCAD as meshes. however, it doesn't seem to work. i open an example file and the GetNum call returns zero.

This is my test code:
std::stringstream str;
long              nBody;
GSErrCode         err;

err = ACAPI_3D_GetNum (API_BodyID, &nBody);
str << "API_BodyID:" << "\t\t\t" << nBody << "\n";

::MessageBox(NULL, str.str().c_str(), "AHHAHAHA", MB_OK);
trying to just arbitrarily obtain a 3D object returns no error, but an incorrect object id.

can anyone help me with what i am doing wrong?

thanks a lot
6 Replies 6
Anonymous
Not applicable
yeah, this is an interesting problem. i tried toying with the provided 3D_Test project, and while i can get it to dump the geometry of any object that i click on, it will not iterate through the whole plan and dump everything at once. it too tells me that there are no bodies in the plan. i don't get an error code.

any help would really be appreciated.
Akos Somorjai
Graphisoft
Graphisoft
The 3D window has to be active, and a valid model is required. Also, the 3D window has to be in shading mode, not in wireframe.

HTH,

Akos
Anonymous
Not applicable
Akos wrote:
The 3D window has to be active, and a valid model is required. Also, the 3D window has to be in shading mode, not in wireframe.

HTH,

Akos
Are there any way to get around this problem? Can't I do this from the addon so the user doesn't have to be bothered?
jmi wrote:
Akos wrote:
The 3D window has to be active, and a valid model is required. Also, the 3D window has to be in shading mode, not in wireframe.

HTH,

Akos
Are there any way to get around this problem? Can't I do this from the addon so the user doesn't have to be bothered?
Perhaps 'ACAPI_Element_Get3DInfo' is what you are after?
Ralph Wessel BArch
Central Innovation
Anonymous
Not applicable
Akos wrote:
The 3D window has to be active, and a valid model is required. Also, the 3D window has to be in shading mode, not in wireframe.
I think it should be implemented like this (from 3D_Test example):

short		origSight = 0, planSight;
// we must switch to the 3D Window's sight
planSight = (short) API_PlanSight;
err = ACAPI_3D_SelectSight (&planSight, &origSight);
if (err != NoError) {
	ErrorBeep ("Cannot switch to the 3D sight", err);
	return;
}
archonmaster wrote:
I think it should be implemented like this (from 3D_Test example):
It's not worth answering questions that are years old - after all, the answer might change every year
Ralph Wessel BArch
Central Innovation

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!