I recently began receiving a .NET framework error whenever I tried to place a template drop in my new corridor. I was able to narrow it down to a template specific issue because when I load in a template .itl file from a different project it works. I tried renaming my template file, using underscores and no spaces, this did not work. I tried copying in the specific templates into a new template file, this didn't work. I tried dragging the templates into a new template, this did not work. I am going to try and remake the templates, but I'm worried about sinking more time into that if it still isn't going to work. I could also try to just edit existing templates I have for other projects to match my needs for this one. I'm really at a loss here, anyone have a similar issue? I pasted the .NET framework error code below. Thanks!
See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************System.Xml.XmlException: '', hexadecimal value 0x1F, is an invalid character. Line 1, position 33170. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr) at System.Xml.XmlTextReaderImpl.ParseAttributes() at System.Xml.XmlTextReaderImpl.ParseElement() at System.Xml.XmlTextReaderImpl.ParseElementContent() at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace) at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) at System.Xml.XmlDocument.Load(XmlReader reader) at System.Xml.XmlDocument.Load(String filename) at Bentley.CifNET.GeometryModel.RoadwayDesigner.TemplateHelpers.TemplateIsInLibrary(String libPath, String templatePath, Boolean bTemplateIsOHLStructure) at Bentley.Civil.RoadwayDesigner.Commands.CreateTemplateDrop.TemplateNameTypeConverter.ConvertTo(ITypeDescriptorContext context, CultureInfo culture, Object value, Type destinationType) at System.ComponentModel.TypeConverter.ConvertToString(Object value) at Bentley.CifNET.UI.Controls.TypeEditorControl.CalculateMinWidthOfTypeEditor(Graphics g, Font font, TypeConverter converter, Int32 defaultWidth) at Bentley.CifNET.UI.Controls.TypeEditorControl.OnHandleCreated(EventArgs e) at System.Windows.Forms.Control.WmCreate(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
The fix for this is to open the ITL file in a hexidecimal editor and doing a find/replace for "1F"... replacing it with nothing to delete the bad character. If you need me to do it, just post the ITL.
We are pretty sure this problem is being caused if a user accidently hits the Ctrl key in addition to the Shift+_ when they are trying to place an underscore in a point name in their ITL. It is logged as Defect 1130284 with our development team to fix.
Thank you for the reply, I just went ahead and remade the templates which solved the issue.