AnsweredAssumed Answered

Create a New Event Frame Based on an Existing Frame

Question asked by Steve Boyko Champion on Oct 28, 2016
Latest reply on Oct 28, 2016 by Steve Boyko

Maybe this is a dumb question but I can't find an easy way to do this.

 

Suppose I have an existing event frame, and I'd like to create a new event frame using VB.NET that is almost the same as the existing one, but with the start and end times changed.

 

Is there a simple way to do that without doing a bunch of copying like:

Dim origEF As AFEventFrame = AFEventFrame.FindEventFrame(afSrv, efGUID)

Dim newEF As New AFEventFrame(origEF.Database, "split", origEF.Template)

newEF.SetStartTime(x)

newEF.SetEndTime(y)

For Each attr In origEF.Attributes

    newEF.Attributes.Add(attr)

Next

Thanks for any help you can provide!

Outcomes