Rhino Annotation

Hello everybody,

How can I use this method below from Rhino 5 to Rhino 7 in c++??

	ON_TextEntity2 * txt_ent = new ON_TextEntity2();
	CRhinoAnnotationText * txt_obj = new CRhinoAnnotationText();
	ON_TextEntity2 * txt_ent1 = new ON_TextEntity2();
	CRhinoAnnotationText * txt_obj1 = new CRhinoAnnotationText();
	ON_TextEntity2 * txt_ent2 = new ON_TextEntity2();
	CRhinoAnnotationText * txt_obj2 = new CRhinoAnnotationText();


	plano.SetOrigin(pc);
	swprintf(regw, L"%.1f", pos);
	ON_wString wText(regw);
	txt_obj->SetAnnotation(*txt_ent);
	txt_obj->SetTextHeight(2.0);
	txt_obj->SetString(wText);
	txt_obj->SetPlane(plano);
	int idx = doc->m_font_table.FindOrCreateFont(wFont, style & 1, style & 2);
	
	txt_obj->SetFontIndex(idx);
	doc->AddObject(txt_obj);

Hi @Luciano_Luiz_da_Silv,

Please review the following SDK sample.

cmdSampleAddText.cpp

– Dale