Highlighted

TextDocumentSuite1()->AEGP_GetNewText returning null handle

New Here ,
Aug 18, 2020

Copy link to clipboard

Copied

Hi, I'm trying to get the text from a layer, my code is currently looking like that :

 

AEGP_StreamVal2		streamValue;
AEGP_StreamType		streamType = AEGP_StreamType_TEXT_DOCUMENT;

result |= suites.StreamSuite5()->AEGP_GetLayerStreamValue(textLayer, AEGP_LayerStream_SOURCE_TEXT, AEGP_LTimeMode_CompTime, &AETime, false, &streamValue, &streamType);

AEGP_ObjectType  layerType;
result |= suites.LayerSuite8()->AEGP_GetLayerObjectType(textLayer, &layerType);

if (layerType != AEGP_ObjectType_TEXT)
	return;

AEGP_MemHandle	textHandle;
result |= suites.TextDocumentSuite1()->AEGP_GetNewText(m_AEGPID, streamValue.text_documentH, &textHandle);

 

 AEGP_GetNewText return A_Err_PARAMETER and textHandle is null.

According to the documentation, I should get the StreamValue using streamType = AEGP_StreamType_TEXT_DOCUMENT, but It doesn't not provide the AEGP_LayerStream value that I should get.

Any advice on that ?

Topics

SDK

Views

31

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

TextDocumentSuite1()->AEGP_GetNewText returning null handle

New Here ,
Aug 18, 2020

Copy link to clipboard

Copied

Hi, I'm trying to get the text from a layer, my code is currently looking like that :

 

AEGP_StreamVal2		streamValue;
AEGP_StreamType		streamType = AEGP_StreamType_TEXT_DOCUMENT;

result |= suites.StreamSuite5()->AEGP_GetLayerStreamValue(textLayer, AEGP_LayerStream_SOURCE_TEXT, AEGP_LTimeMode_CompTime, &AETime, false, &streamValue, &streamType);

AEGP_ObjectType  layerType;
result |= suites.LayerSuite8()->AEGP_GetLayerObjectType(textLayer, &layerType);

if (layerType != AEGP_ObjectType_TEXT)
	return;

AEGP_MemHandle	textHandle;
result |= suites.TextDocumentSuite1()->AEGP_GetNewText(m_AEGPID, streamValue.text_documentH, &textHandle);

 

 AEGP_GetNewText return A_Err_PARAMETER and textHandle is null.

According to the documentation, I should get the StreamValue using streamType = AEGP_StreamType_TEXT_DOCUMENT, but It doesn't not provide the AEGP_LayerStream value that I should get.

Any advice on that ?

Topics

SDK

Views

32

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Have something to add?

Join the conversation