Hi all.
I need to export a file for someone else to use in Sketchup. I used a lot of instanced geometry (no ICE).
Found various scripts for converting the instances to models, but none seem to work on 2015.
Thanks!
Convert Instance to model / geometry
Re: Convert Instance to model / geometry
I think freezing them turns them to normal objects.
Re: Convert Instance to model / geometry
below script seems to work for me
Code: Select all
si = Application
sel = si.Selection
count = si.Selection.Count
selection = [sel[i] for i in range(count) if str(si.ClassName(sel[i])) == 'Model' and sel[i].ModelKind == 2]
for i in selection:
d = si.Duplicate("B:"+str(i.InstanceMaster))
si.MatchTransform(d, i)
if i.Parent.Name != si.ActiveProject.ActiveScene.Root.Name:
si.ParentObj(i.Parent, d)
si.DeleteObj(i)
Re: Convert Instance to model / geometry
Fantastic. Thought I tried that one - dunno why it didn't work the first time. Thanks!gaboraa wrote:below script seems to work for me
Code: Select all
si = Application sel = si.Selection count = si.Selection.Count selection = [sel[i] for i in range(count) if str(si.ClassName(sel[i])) == 'Model' and sel[i].ModelKind == 2] for i in selection: d = si.Duplicate("B:"+str(i.InstanceMaster)) si.MatchTransform(d, i) if i.Parent.Name != si.ActiveProject.ActiveScene.Root.Name: si.ParentObj(i.Parent, d) si.DeleteObj(i)
@Draise: No the Instances don't become models by freezing them
Re: Convert Instance to model / geometry
Ah. I was thinking clones.
Who is online
Users browsing this forum: No registered users and 32 guests