- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am using vb.net to create a drawing of a weldment. I want to create a leader note that includes a parameter from the "preparation state" of the the weldment for one of the specific components in that weldment. I am able to create the leader note just fine but when I try to include the parameter in the FormattedText I get this error:
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
Additional information: Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
I have created the text manually and then used a function that pulls the XML code out of the note so that I can put it in my program. Here is the text I want (3.75 is the parameter from the weldment):
DRILL Ø3.75 HOLE
AND BEVEL 37.5°
This is the XML code I pulled out using a function:
"DRILL Ø <Parameter Resolved='True' ComponentIdentifier='I:\Sillito\Inventor\TwoTest\Pipe\Repad1.ipt' Name='d23' Precision='2'>3.75</Parameter> HOLE<Br/>AND BEVEL 37.5°"
Here is the code I am using to create the note (not all of it, just the relevant section):
Dim sText As String sText = "DRILL Ø <Parameter Resolved='True' ComponentIdentifier='I:\Sillito\Inventor\TwoTest\Pipe\Repad1.ipt' Name='d23' Precision='2'>3.75</Parameter> HOLE<Br/>AND BEVEL 37.5°" Dim oLeaderNote As LeaderNote oLeaderNote = sheet.DrawingNotes.LeaderNotes.Add(oLeaderPoints, sText)
Can anyone tell me why I'm getting this error and how to resolve it?
Solved! Go to Solution.