Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

MAXScript Rollout Handler Exception ( -- Runtime error: .NET runtime exception: Index was outside the bounds of the array)

MAXScript Rollout Handler Exception ( -- Runtime error: .NET runtime exception: Index was outside the bounds of the array)

bilal.saleem7FTYS
Contributor Contributor
2,852 Views
5 Replies
Message 1 of 6

MAXScript Rollout Handler Exception ( -- Runtime error: .NET runtime exception: Index was outside the bounds of the array)

bilal.saleem7FTYS
Contributor
Contributor

Hello, 

I am having the following error when I try to import Traffic simulation data .FZP file through Civil View in 3ds Max. Can anyone please guide me what is the issue. 

 

-- Runtime error: .NET runtime exception: Index was outside the bounds of the array.

 

I have also attached the screen shot for further reference. Any help would be highly appreciated. Thank you 

0 Likes
2,853 Views
5 Replies
Replies (5)
Message 2 of 6

denisT.MaxDoctor
Advisor
Advisor

most likely, the error is that you are accessing some list of .NET object with numbering as in MXS (1...N), and not (0...N-1), as it should be in the general case for .NET.
But to be more clear, we need to look at all the related code and full error message including full trace in the listener.

Message 3 of 6

bilal.saleem7FTYS
Contributor
Contributor

Thank you sir for you quick response. I have attached a copy of script that pops up with Line# 455 highlighted (Sorry its a word doc because I cannot attach the exact format .ms over here), when the Runtime error shows up. Please have a look and share your thoughts what might be causing the issue. 

 

I am not a programming expert but because it an array issue so I assume there is some sort of trouble with the 'Time resolution step' in the Vissim data I received from the traffic guy. 

0 Likes
Message 4 of 6

bilal.saleem7FTYS
Contributor
Contributor

Also I have attached the Data file from Vissim in .txt format which shows Simulation sec etc for your reference. 

0 Likes
Message 5 of 6

denisT.MaxDoctor
Advisor
Advisor

This tool requires a special plug-in or dll (some extras that are not included in the standard 3DS MAX installation). It is based on some .NET objects defined in these addons.
There is no way to fix the "bug" and I don't think the problem is caused by some kind of bug. Debugging this tool and data is definitely not an easy and enjoyable task for a volunteer. The tool is copyrighted by Autodesk... so, they should investigate and help.

0 Likes
Message 6 of 6

steve.johnson.WSP
Contributor
Contributor

found an easy fix that's been working for me: resave the FZP file with encoding changed from UDF-8-BOM to UDF-8 in Notepad++ and it imported fine. Vissim for some reason changed this in v2021 and up

 

I've been bumping old threads where this error was popping up since it's getting less common to receive pre-Vissim2021 FZP files from clients and people will probably be searching for solutions. I think Autodesk currently lists Max/Civil View as 'incompatible with Vissim 2021/2022' in the knowledgebase which, while technically correct, can be fixed in about 2 seconds by resaving the FZP. 

0 Likes