shape.Name
The object name shown in the Object Manager. Read/write — name things in one pass and every later script can find them exactly, which beats hunting by index.
Signature
shape.Name
Notes
The object name shown in the Object Manager. Read/write — name things in one pass and every later script can find them exactly, which beats hunting by index.
Python example (runnable)
Requires
pywin32. The example assumes app / doc / page / layer are already connected.
See Connection & InitPython
shapes = app.ActiveSelectionRange
for i in range(1, shapes.Count + 1):
s = shapes.Item(i)
print("Old name: ", s.Name)
s.Name = "batchA_" + str(i).zfill(3) # rename them all
print("renamed to: ", s.Name)
About this section: Object Data
Object Data — object data and document properties.
- This section has 6 entries; this is one of them.
- See the full section index: Object Data
Other entries in this section
- shape.StaticIDA unique ID within the file, read-only, and stable across reopening. T
- shape.URLA hyperlink attached to the object, carried out on PDF export. Interac
- shape.PowerClipParent / shape.Layer / shape.PageWalks back up: which frame clips this object, which layer, which page.
- doc.PropertiesFile properties (title, author, keywords, notes). Fill them in consist
- doc.MetadataThe metadata collection, finer-grained than Properties and it takes cu