Refresh Clipping Plane Section

Is there a way to refresh the clipping plane sections in Rhino 8? I have a linked model that I am documenting and a script that I am using to refresh the layout file when the model changes. When I refresh the linked model, the clipping plane sections as displayed in the detail don’t update so I’m left with old drawing on top of the new model. Would love a way to refresh the sections after I refresh the model.

    private void UpdateLinkedBlocks(RhinoDoc doc)
    {
        int linkedBlockCount = 0;
        int updateCount = 0;
        string filename;

        foreach (InstanceDefinition idef in RhinoDoc.ActiveDoc.InstanceDefinitions)
        {
            if (idef.UpdateType == InstanceDefinitionUpdateType.Linked || idef.UpdateType == InstanceDefinitionUpdateType.LinkedAndEmbedded)
            {
                linkedBlockCount++;
                if (idef.ArchiveFileStatus == InstanceDefinitionArchiveFileStatus.LinkedFileIsNewer)
                {
                    filename = idef.SourceArchive;
                    bool updated = RhinoDoc.ActiveDoc.InstanceDefinitions.UpdateLinkedInstanceDefinition(idef.Index, filename, true, false);
                    if ( updated)
                    {
                        updateCount++;
                        doc.Views.Redraw();
                    }
                    else if (idef.ArchiveFileStatus == InstanceDefinitionArchiveFileStatus.LinkedFileIsDifferent)
                    {
                        filename = idef.SourceArchive;
                        RhinoApp.WriteLine($"Linked File is Different: {filename}");
                    }
                }
            }
        }
        if ( linkedBlockCount == 0 ) 
        {
            RhinoApp.WriteLine("No Linked Blocks Found");
        }
        else
        {
            RhinoApp.WriteLine($"{linkedBlockCount} Linked Blocks Found\n{updateCount} Linked Blocks Updated");
        }
    }

@rajaa - is this something you can help with?

@David_Moreau You can refresh all drawings if you can call the Rhino command that updates all section drawings: “UpdateClippingDrawings All”.
Does that help?

Hi Rajaa. Thanks for the response. I’m not using clipping drawings. I have sections styles set up by layers.

I dug a little deeper and am found this happens in a very specific workflow. I have a block in the referenced file, say Activation01, and there is the same Activation01 block in the drafting file. I use the code above to update the linked file which updates the block inside the drafting file. The geometry inside the block updates, but the section as displayed by the clipping plane doesn’t. I attached a screengrab to try and explain.


Thanks for sharing these details. Can you please send a file to test with, and step by step process. I’d like to be able to repeat at our end.