Highlighted

Copy pasting objects renames them

Community Beginner ,
May 12, 2020

Copy link to clipboard

Copied

Hello, I am working in Captivate 2019 version 11.5.1.499 and have written a Javascript with a For Loop running through 30+ objects by name (Is there any ID system that can be used besides the actual object name? These objects are not TEBs, they are text captions/images.) and it works perfectly fine.

The problem occurs when I try to copy and paste the slide with all of its content into another project (which does not have any objects with the same name as the ones I am pasting into it). The Javascript comes in fine but the objects are all renamed, and for the code to work, since it is based off of the object names, I will have to rename every single object. Is there a way to force Captivate to keep the same name of all Objects on a slide when copying and pasting them into another Project (or anywhere for that matter)?

Views

238

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Copy pasting objects renames them

Community Beginner ,
May 12, 2020

Copy link to clipboard

Copied

Hello, I am working in Captivate 2019 version 11.5.1.499 and have written a Javascript with a For Loop running through 30+ objects by name (Is there any ID system that can be used besides the actual object name? These objects are not TEBs, they are text captions/images.) and it works perfectly fine.

The problem occurs when I try to copy and paste the slide with all of its content into another project (which does not have any objects with the same name as the ones I am pasting into it). The Javascript comes in fine but the objects are all renamed, and for the code to work, since it is based off of the object names, I will have to rename every single object. Is there a way to force Captivate to keep the same name of all Objects on a slide when copying and pasting them into another Project (or anywhere for that matter)?

Views

239

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
May 12, 2020 0
Advocate ,
May 12, 2020

Copy link to clipboard

Copied

Here is a thought...

What if your named all your objects that you intend to reference using a common prefix?

That way you can use the JavaScript to find all objects with that prefix and when you copy/paste - the prefixes will remain.

myPrefix_object1 when pasted might become  myPrefix_object1_2 ...  myPrefix_object1_270

But you should still be able to find them.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 12, 2020 0
Community Beginner ,
May 12, 2020

Copy link to clipboard

Copied

That's a great solution however I do have a second problem I should have mentioned (my fault), I am also using the specific numbers in the loop to reference the named objects I need to show/hide.

For instance, Letter_03 when, the loops reaches that letter I concatenate "Letter_0" with the number the loop is at "3" to then hide/show that object. Is there maybe a better way of doing this? Or better yet a way to copy/paste without Captivate renaming?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 12, 2020 0
Advocate ,
May 12, 2020

Copy link to clipboard

Copied

Unfortunately, you're stuck on the copy/paste renaming.

I just know that if I need to do what you are doing - that I append a prefix prior to copy/paste because Captivate will constantly change the suffix. Then you just find all the objects with the prefix and there is no need to concatenate at all.

I know it is not much help in the moment - just some advice going forward.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 12, 2020 0
Lilybiri LATEST
Most Valuable Participant ,
May 12, 2020

Copy link to clipboard

Copied

There is no way to prevent the renaming. This happens both within a project as between projects.  I already logged feature requests to prevent this from happening when pasting into a new project, but to no avail.  Because of the requirement of uniqueness of names within one project, I understand that renaming.

Rename consists of adding one number at the end. To restore the original names, you have to delete that last number.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 12, 2020 0