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");
}
}