May 31, 20188 yr 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 Jan Vaane - KLM149 aka PH-JVA
May 31, 20188 yr 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
May 31, 20188 yr 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 Jan Vaane - KLM149 aka PH-JVA
May 31, 20188 yr 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
May 31, 20188 yr 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 Jan Vaane - KLM149 aka PH-JVA
Archived
This topic is now archived and is closed to further replies.