Archicad C++ API
About Archicad add-on development using the C++ API.

Memo size

Anonymous
Not applicable
Hi,
I'm trying to return a number of windows/doors in a wall. I havent found a function that does this, but found a guidlist of windows attached to the wall element. Now I'm stuck on getting the number of windows. Tried this:


err = ACAPI_Element_GetMemo (guid, &memo, APIMemoMask_WallWindows);
		if (err==NoError){
			numW = BMGetHandleSize ((GSHandle) memo.wallWindows)/sizeof(API_Guid);	

but it doesnt work - the "numW" is always 8 characters long.. I tried to define it as long, double and short type. I bet I'm doing something wrong, I'm a beginner in programming.

so, where's the catch?

thanks..
1 REPLY 1
Anonymous
Not applicable
hi,

you may use fallowing way.

err = ACAPI_Element_GetMemo (guid, &memo, APIMemoMask_WallWindows);
if (err==NoError && memo.wallWindows != NULL){
numW = BMGetHandleSize (reinterpret_cast<GSPtr>(memo.wallWindows)) / sizeof(API_Guid);

it may work.

Ranga

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!