Copying & Pasting Design Elements

We attempted to implement automated Notes design moves by writing a Lotuscript agent using Notes DXL. This failed because of several bugs in the DXLImporter method.

Any alternative ideas? Can design objects be copied and pasted in an automated fashion (scheduled agent) using Lotuscript?

Anyone using Team Studio? Are automated/scheduled moves supported in Team Studio?

Subject: Copying & Pasting Design Elements

Somehow I thought you could inherit design elements at the element level from a template. If you manually copy/paste an element it prompts you if you wish to update the local element when the parent element changes.

Not quite sure about the details but I always say ‘no’ to the prompt as I don’t want to break stuff throughout my DB’s.

(That’s because I tend to be forgetful of automated things like that though)

Shawn

Subject: RE: Copying & Pasting Design Elements

or something similar. Design elements are “Notes document” with their own UNID

Dim Sess As New NotesSession
Dim Session As New NotesSession
Dim warndb,db As NotesDatabase
Dim doc, newdoc, newdocForm, newdocVue As NotesDocument
Dim agent As NotesDocument
Dim form As NotesDocument
Dim vue As NotesDocument
Dim uid As String

 uid = "32630C822AFD94F685256A6C004ED819"' //unID of agent to copy
 uidForm = "28175B1A5DA97C6A85256A6C004ED483" ' //uUNID of form
 uidVue= "C460CFB8A882071F85256A6C004EC6DF"' //UNID of view


 Set warndb = Session.GetDatabase("Server","db.nsf")


 Set agent = warndb.GetDocumentByUNID(uid)
 Set form =      warndb.GetDocumentByUNID(uidForm)
 Set vue = warndb.GetDocumentByUNID(uidVue)
 
 Set db = Sess.CurrentDatabase


 Set newdoc = agent.CopyToDatabase(db)
 Set newdocForm= form.CopyToDatabase(db)
 Set newdocVue= vue.CopyToDatabase(db)
 
        
 Call newdoc.save(True,False)
 Call newdocForm.save(True,False)

 Call newdocVue.save(True,False)

End Sub

Subject: RE: Copying & Pasting Design Elements

So instead of dxlexporting and dxlimporting the design elements, they can just be copied to the database.

Neat. Thanks.

Subject: Copying & Pasting Design Elements

We have implemented element management in our internal workflow/task management system. We found that DXL is not really necessary to move design elements around - using the NotesNoteCollection classes is easier.

While the DXL importer and exporter is far from perfect, it does not contain any bugs that are show stoppers with respect to moving design elements around. You just have to make sure that the contents of any sections must be wrapped in a CDATA section to ensure that operators in the code do not confuse the parser when the DXL is being imported. When dealing with DXL, we found it to be prudent to just wrap anything that is user or developer entered text inside CDATA sections.

We also use Team Studio CIAO, which seems to totally wreck any attempts to manipulate the design of any CIAO-watched databases. If we get CIAO out of the way, our design element management system works fine.

HTH

Subject: RE: Copying & Pasting Design Elements

Thanks for your response.