import Rhino
import Rhino.Geometry as rg
import scriptcontext as sc
import rhinoscriptsyntax as rs
import math
sc.doc = Rhino.RhinoDoc.ActiveDoc
def RenameLayootWithSerialName():
layouts = rs.ViewNames(False,1)
prefix = rs.GetString("input prefix of layout",False,False)
for i in range(len(layouts)):
newname = str(prefix)+'-'+str(i+1).zfill(2)
rs.RenameView(layouts[i],str(newname))
RenameLayootWithSerialName()
I wrote this script to help me rename pageviews/layout,
but it doesn’t work the way I want,
it rename pageviews/layout by create order not print order,
I really need it to rename by print order,so that i could insert new page in pageviews.
If anyone can help me with this
This will be great.