Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Unable to add component SimObjects

Featured Replies

After app v1.34.b01 start  > tab Other addons>Add component> Set path=D:\Documenten\Prepar3D v4 Add-ons\Aircraft
In Aircraft folder  1 AC (including aircraft.cfg)
Added Description and Name then submit which returns a:   
Unhandeld exception: startIndex cannot be larger than length of the string (see below)
Parameter name: startIndex
Changed folder structure  > no luck

What's going wrong?

JanV

 

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentOutOfRangeException: startIndex cannot be larger than length of string.
Parameter name: startIndex
   at System.String.Substring(Int32 startIndex, Int32 length)
   at P3DV4AddonOrganizer.AddComponent.button1_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies ************** bla bla 
 

 

  • Commercial Member

Hello Jan,

can you please post the exact path of the add-on.xml is that you want to add this to and where the component itself is? The exception is probably caused by a similarity between the two paths, maybe in conjunction with using a different drive - not sure.

Best regards

LORBY-SI

  • Author

For this trial I placed the aircraft folder in D:\Documenten\Prepar3D v4 Add-ons\MyAircraft \C152 as well as the where the xml is written.

I the mean time I found out that when placing the aircraft folder in the root of P3D installation folder the problem is solved; working now 100%

<?xml version="1.0" encoding="utf-8"?>
<SimBase.Document Type="AddOnXml" version="4,0" id="add-on">
  <AddOn.Name>Base C152</AddOn.Name>
  <AddOn.Description>C152 II</AddOn.Description>
  <AddOn.Component>
    <Category>SimObjects</Category>
    <Path>F:\Base</Path>
    <Name>Carenado C152 II P3D4</Name>
  </AddOn.Component>
</SimBase.Document>

as well as the Effects

<?xml version="1.0" encoding="utf-8"?>
<SimBase.Document Type="AddOnXml" version="4,0" id="add-on">
  <AddOn.Name>Effects C152</AddOn.Name>
  <AddOn.Description>Effects C152</AddOn.Description>
  <AddOn.Component>
    <Category>Effects</Category>
    <Path>F:\Base\Carenado C152II P3D4\_FSE_readme\Effects</Path>
    <Name>Effects C152 II P3Dv4V4</Name>
  </AddOn.Component>
</SimBase.Document>

Tks Oliver

KR JanV

  • Commercial Member
3 minutes ago, KLM149 said:

For this trial I placed the aircraft folder in D:\Documenten\Prepar3D v4 Add-ons\MyAircraft \C152 as well as the where the xml is written.

Hello Jan,

I doubt that. P4AO will always write the XML to C:\Users\...\Documents\Prepar3D V4 Add-ons\<addon name>\add-on.xml

When you try to save the new assignment, P4AO checks if the content is in the same subdirectory as the XML is - and that is where it is going wrong. Please check your paths again - there is a similarity there that tricks P4AO into thinking that the addon is in the same place where the add-on.xml is, but the path doesn't match (is too short) so the exception happens.

Best regards

LORBY-SI

  • Author

Hello Oliver,

that was the trick; I previously had a folder D:\Documenten\Prepar3D v4 Add-ons\MyAircraft \C152\[with the usual ac contents]
When i tried to create a component from that location the unhandled exception occurs. I expected the app to write ...\C152 with the xml inside.
Placing the aircraft folder on the same disk as where P3D is installed works fine.
XML >> D:\Documenten\Prepar3D v4 Add-ons\Base C152
AIRCFT >> F:\Base\Carenado C152II P3D
KR JanV

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.