cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
Fermat
Contributor

ACAPI_LibraryPart_GetSection return value from ArchiCAD 27

From ArchiCAD 27 the ACAPI_LibPart_GetSection function has been replaced by the ACAPI_LibraryPart_GetSection one. Till ArchiCAD 26 when I try to get data from an empty '2DDR' (

API_Sect2DDraw) section using the ACAPI_LibPart_GetSection function I obtained an APIERR_NOLIBSECT error. From ArchiCAD 27 (and also on ArchiCAD 28) the result of the ACAPI_LibraryPart_GetSection function call is NoError. Is there a way to understand that the section doesn't exist?

Regards

Silvia


2.png
1 Solution

Accepted Solutions
Hiromichi Shinkawa
Graphisoft
Graphisoft

Hi,

I'd suggest you to check the section handle if you cannot get error code. By the way, I've checked AC28 (build 3110), it returns APIERR_NOLIBSECT in case of empty section.

	section.sectType = API_Sect2DDraw;

	GSHandle	sectionHdl;
	err = ACAPI_LibraryPart_GetSection(libPart.index, &section, &sectionHdl, &sectionStr);

	if (sectionHdl == nullptr) {
		ACAPI_WriteReport("Section is empty!", false);
	}

HTH.

Go to post

1 Reply 1
Hiromichi Shinkawa
Graphisoft
Graphisoft

Hi,

I'd suggest you to check the section handle if you cannot get error code. By the way, I've checked AC28 (build 3110), it returns APIERR_NOLIBSECT in case of empty section.

	section.sectType = API_Sect2DDraw;

	GSHandle	sectionHdl;
	err = ACAPI_LibraryPart_GetSection(libPart.index, &section, &sectionHdl, &sectionStr);

	if (sectionHdl == nullptr) {
		ACAPI_WriteReport("Section is empty!", false);
	}

HTH.

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!