Notifications
Clear all
[Closed] renaming autocad layers
Page 2 / 2
Prev
Jan 28, 2009 11:05 pm
Wouldn’t a case expression be a tad cleaner instead of that many if expressions?
Jan 28, 2009 11:05 pm
Hi,
What you are looking for is the matchpattern function. Look it up the maxscript help
if matchpattern o.name pattern:"*LP*" do (...something...)
Jan 28, 2009 11:05 pm
That’s it!!
Thanks for all your help guys (and gals?)
final script:
(
Objs = for o in objects collect o
for o in Objs do
(
if matchpattern o.name pattern:"*LP*" do
(
o.material = meditMaterials[1]
ConvertTo o Editable_Poly
)
if matchpattern o.name pattern:"*HP*" do
(
o.material = meditMaterials[2]
ConvertTo o Editable_Poly
)
)
)
Page 2 / 2
Prev