Skip to main content
Participant
May 12, 2020 5:19 PM UTC
Question

Copy pasting objects renames them

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)?

    This topic is closed to new replies. Start a new post to keep the conversation going.

    4 replies

    Lilybiri
    Legend
    May 12, 2020 6:35 PM UTC

    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.

    Translate
    Stagprime2687219
    Legend
    May 12, 2020 5:31 PM UTC

    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.

    Translate
    Participant
    May 12, 2020 5:53 PM UTC

    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?

    Translate
    Stagprime2687219
    Legend
    May 12, 2020 6:04 PM UTC

    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.

    Translate