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

Adding Instance Reference from ActiveDoc to File3dm

$
0
0

I am trying to add Instance Objects from my rhino file to a File3dm to save out.
The Instance Objects are embedded block instances.
I have successfully added the block reference to the new 3dm block manager, but the geometry is still missing. The block manager shows ERROR no geometry found for block definition.

                if (partObject is InstanceObject iref) {
                    var idef = iref?.InstanceDefinition;
                    file.AllInstanceDefinitions.Add(idef);
                    file.Objects.AddInstanceObject(idef.Index, iref.InstanceXform, iref.Attributes);
                }

I have tried to use the example from this post, but it uses geometry that was not previously placed in the file.

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 8550

Trending Articles