Copy Paste for automation in large Master plan design

I need help with a simple script.

What the script is supposed to do :

Name of selected objects should be copied onto clipboard----> A new Text is created with the copied name and aligned to the centre of the object from which the name was copied.

From what I know this is done using a for loop command since we will be selecting multiple objects and running the script for each of them in one go.

Let me know if there is a solution.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
miauu's picture

.

(
	selObjsArr = selection as array
	if selObjsArr.count != 0 then
	(
		for o in selObjsArr do
		(
			text text:o.name size:((o.max - o.min).x * 0.2) pos:o.center 
		)
	)
	else
		messagebox "Select some objects" title:"Empty Selection"
)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.