A script question. After I select an object, specify that the object uses the system’s current time to name the object and then copy it into a layer hidden. Each time the implementation of the script will perform the above operation, and now there are many objects inside the layer, I would like to select the last time the name of the object display to the current default layer. Is the object name in the layer sorted? How do I read the name of the last time after sorting?
This the python code:
def FilletObjWithDateTime(): date = time.strftime(date_format, time.gmtime()) tnow = time.strftime(time_format) msg="Select Object name by layer" objid = rs.GetObject(msg,preselect=True,select=False,subobjects=False) if objid: rs.ObjectName( objid, str(date)+str(tnow) ) FilletObjWithDateTime()