We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Problem with GetEffectsByShape in last version of Aspose Slides

This code line:
IEffect effect = shape.Slide.Timeline.MainSequence.GetEffectsByShape(shape)[0];

effect.Timing.TriggerDelayTime
is always 0

effect.Timing.Duration
is always Nan

With older versions of Aspose working properly.
Suggestions?

Fabrizio


Hi Fabrizio,


I have observed your requirements. Can you please share which version of Aspose.Slides worked properly on your end before. Please share the currently used version along with environment details, source presentation, generated presentation and working sample project. Please share the requested information so that we may further investigate and resolve the issue.

Best Regards,

Aspose.Slides.dll

Version: 16.7.0.0

Enviroment Web:
Windows Server 2012
IE 11

Enviroment Client:
Windows 10
Edge

Best Regards,

Hi Fabrizio,


Thank you for sharing the information. Can you please share the complete information requested in my previous post.

Best Regards,

The attached zip contains:

  1. sample project
  2. pptx of example with effect on first shape of first slide
Regards.

Hi Fabrizio,

I have worked with the presentation file shared by you and have been able to observe the issue. An issue with ID SLIDESNET-38506 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be fixed.

We are sorry for your inconvenience,

I’m trying with Aspose.Slides version 17.8.0.0 and not work. Suggestions ?
Fabrizio

@Faffo,

I have worked with sample project using Aspose.Slides for .NET 17.8 and unable to observe the issue. Can you please share screenshot of issue you are facing so that i may further investigate to help you out.

ScreenshotAsposeSlides.jpg (257.7 KB)

@Faffo,

I have requested our product team to look into this in details. I request for your patience until further feedback is shared by our product team. Product team will look into this and will reopen issue to help you out after initial investigation.

Adnan.Ahmad,
do you have news ?

Thanks
Fabrizio

@Faffo.

Our product team has investigated the issue on their end. The first shape in Test.pptx presentation has one Entrance effect with TriggerDelayTime = 3sec and NaN Duration. The effect has following two behaviors:

SetEffect with Duration = 0.001sec;
FilterEffect with Duration = 2sec.


 Presentation pres = new Presentation(path + "Test.pptx");
        ISlide slide = pres.Slides[0];

        //Iterating through all shapes inside the slide
        foreach (Shape shape in slide.Shapes)
        {
            if (shape.Slide.Timeline != null && shape.Slide.Timeline.MainSequence != null)
            {
                IEffect[] effects = shape.Slide.Timeline.MainSequence.GetEffectsByShape(shape);
                if (effects.Length > 0)
                {
                    IEffect effect = shape.Slide.Timeline.MainSequence.GetEffectsByShape(shape)[0];
                    if (effect.PresetClassType == EffectPresetClassType.Entrance)
                    {
                        if (!float.IsNaN(effect.Timing.TriggerDelayTime))
                        {
                            Console.WriteLine("Effect delay: " + effect.Timing.TriggerDelayTime.ToString());
                        }

                        if (!float.IsNaN(effect.Timing.Duration))
                        {
                            Console.WriteLine("Effect duration: " + effect.Timing.Duration.ToString());
                        }

                        // Added code for reading the effect behaviors
                        IBehaviorCollection behaviors = effect.Behaviors;
                        foreach (IBehavior behavior in behaviors)
                        {
                            Console.WriteLine("Behavior type: " + behavior.GetType());
                            if (!float.IsNaN(behavior.Timing.Duration))
                            {
                                Console.WriteLine("Behavior duration: " + behavior.Timing.Duration.ToString());
                            }
                        }
                    }
                }
            }
        }

Hi mudassir.fayyaz,
I tried it and it works.

Thanks a lot.
Fabrizio