damien11235's blog

request for script to create layer from object name.

hi, is it possible to have a script which creates a layer from an object name.

there is a script here which creates a layer from material name.i cannot find it on the site any more so i am attaching the script below

for m in scenematerials do
if LayerManager.getLayerFromName m.name == undefined
then NewLayer = LayerManager.newLayerFromName m.name
else NewLayer = LayerManager.getLayerFromName m.name
for obj in objects do if obj.material.name == m.name do NewLayer.addNode obj
saveMaxFile (getfilenamefile (maxfilename) + "_for_Revit.max") useNewFile: true

Syndicate content