Some .VSDX files not importing due to certain shape properties with error message: Index was out of range. Must be non-negative and less than the size of the collection.

Some .VSDX files are not importing due to certain shape properties with error message: Index was out of range. Must be non-negative and less than the size of the collection.

I have tried in Trados Studio 2021 SR2 16.2.8.9097 and Trados Studio 2022 SR1 17.1.8.17828

Error message in Trados Studio indicating 'Index was out of range. Must be non-negative and less than the size of the collection.' with a stack trace of system methods listed below.

I've created a file with the bare minimum, only one shape, if I delete the shape, Trados will import fine, with the shape there, I always get the error message. 



Generated Image Alt-Text
[edited by: Trados AI at 12:59 PM (GMT 0) on 29 Feb 2024]
emoji
  • <SDLErrorDetails time="10/16/2023 9:54:37 AM">
      <ErrorMessage>Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index</ErrorMessage>
      <Exception>
        <Type>System.ArgumentOutOfRangeException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
        <ParamName>index</ParamName>
        <HelpLink />
        <Source>mscorlib</Source>
        <HResult>-2146233086</HResult>
        <StackTrace><![CDATA[   at System.Collections.ArrayList.get_Item(Int32 index)
       at Aspose.Diagram.LayerCollection.get_Item(Int32 index)
       at Sdl.FileTypeSupport.Filters.Visio.Extensions.ShapeExtensions.GetShapeLayers(Shape shape, String shapeLayerMemberValue)
       at Sdl.FileTypeSupport.Filters.Visio.Extensions.ShapeExtensions.IsHidden(Shape shape)
       at Sdl.FileTypeSupport.Filters.Visio.Parser.VisioParser.IsActive(Shape shape)
       at Sdl.FileTypeSupport.Filters.Visio.Parser.VisioParser.UpdateShapesNumber(IEnumerable shapes)
       at Sdl.FileTypeSupport.Filters.Visio.Parser.VisioParser.CalculateNumberOfShapes(Diagram diagram)
       at Sdl.FileTypeSupport.Filters.Visio.Parser.VisioParser.ParseNext()
       at Sdl.FileTypeSupport.Framework.Integration.FileExtractor.ParseNext()
       at Sdl.FileTypeSupport.Framework.Integration.MultiFileConverter.ParseNext()
       at Sdl.FileTypeSupport.Framework.Integration.MultiFileConverter.Parse()
       at Sdl.TranslationStudio.Editor.TranslationEditor.TranslatableDocument.Load(IJobExecutionContext context)
       at Sdl.Desktop.Platform.Services.JobRequest.Execute(IJobExecutionContext context)
       at Sdl.Desktop.Platform.Implementation.Services.JobExecuter.Execute(JobData jobData)
       at Sdl.Desktop.Platform.Implementation.ResourceLoggingInternalCommandExecuter`1.ExecuteWithResourceLogging(TCommandData commandData, String message)
       at Sdl.Desktop.Platform.Implementation.Services.Job._worker_DoWork(Object sender, DoWorkEventArgs e)
       at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
       at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)]]></StackTrace>
      </Exception>
      <Environment>
        <ProductName>Trados Studio</ProductName>
        <ProductVersion>Studio16</ProductVersion>
        <EntryAssemblyFileVersion>16.2.12.9338</EntryAssemblyFileVersion>
        <OperatingSystem>Microsoft Windows 10 Enterprise</OperatingSystem>
        <ServicePack>NULL</ServicePack>
        <OperatingSystemLanguage>1033</OperatingSystemLanguage>
        <CodePage>1252</CodePage>
        <LoggedOnUser>AD\tsnow</LoggedOnUser>
        <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
        <ComputerName>USPRL-J7BBLQ2</ComputerName>
        <ConnectedToNetwork>True</ConnectedToNetwork>
        <PhysicalMemory>33261984 MB</PhysicalMemory>
      </Environment>
    </SDLErrorDetails>

    emoji
  • The forum will not allow me to upload .vsdx but if Paul or another dev would like I can send via email.

    emoji
  •  

    Zip the file and then you can attach it.

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji
  • If you need a version with some additional text so that the import is not just zero words let me know.

    emoji
  •  

    If you need a version with some additional text so that the import is not just zero words let me know.

    That would be helpful if you can.  I may not get to this until tomorrow so no rush.

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji
  • Hello,

    I understand that you're having trouble importing .VSDX files into Trados Studio due to an error message related to certain shape properties. This issue might be due to the specific properties of the shape in your .VSDX file.

    Here are some steps you can try to resolve this issue:

    Step 1: Open the .VSDX file in the original application (Microsoft Visio) and try to simplify the shape properties. This could mean reducing the complexity of the shape or removing any additional properties that might not be necessary for translation.

    Step 2: Save the .VSDX file again and try to import it into Trados Studio.

    Step 3: If the issue persists, you might want to consider converting the .VSDX file into another format that Trados Studio can handle more easily, such as .DOCX or .PPTX.

    Please note that these are general suggestions and the effectiveness might vary depending on the specific properties of the shape in your .VSDX file.

    I hope this helps! If you have any other questions or need further assistance, feel free to ask.

    Best regards,

    RWS Community AI

    emoji
  • 6355.Example2.zip

    This one has that same image and one line of text. With the shape we get the error message, delete the shape and it imports just fine.

    emoji
  • Thanks  

    I can reproduce the issue ok and will log it with the support team to validate and create an item for the dev team if needed.  I'll come back to you when I have more info.

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji