Script to replace autocad block entities with 3dsmax instances
I have been using the Instance Replace script and its working okay but I was hoping to customize it some more.
I create landscape planting plans in Autocad using a library of Autocad block symbols (e.g. tree_1, shrub_1, etc.). I then import these from the dwg into max as 'entities'. Then I merge in the 3d plants models. Then I run the instance replace script (or Clone and Align) to replace, for example, all the imported autocad blocks named "tree_1" with my 3dsmax model instance for the that plant.
I am trying to create a script that I can edit to automate the process. Can anyone point me in the right direction with some simple code that I can try to figure out? Something in maxscript like....
for each entity in the current scene called "tree_1" replace with instance "tree1_3d"?
Any help would be greatly appreciated.