Quantcast
Channel: Rhino Developer - McNeel Forum
Viewing all articles
Browse latest Browse all 8556

Howto retrieve plugin specific document data

$
0
0

@dsw wrote:

Hi

i store plugin specific data in a document via the CRhinoPlugIn::WriteDocument event which works fine within the plugin.
Now i have a situation where i want to read the 3dm file without opening it and i use at the moment following code:

	FILE* archive_fp = ON::OpenFile(file3dm, L"rb");
	if (0 == archive_fp)
	ON_BinaryFile archive(ON::archive_mode::read3dm, archive_fp);
	ONX_Model model;
	bool rc = model.Read(archive);
	ON::CloseFile(archive_fp);
	for (int i = 0; i < onxModel.m_object_table.Count(); i++)
	{
		const ONX_Model_Object& model_obj = onxModel.m_object_table[i];

                ...
	}

	onxModel.Destroy();

Is it possible to get the document data which was written with CRhinoPlugIn::WriteDocument also with ONX_Model?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 8556

Trending Articles