02-10-2020
07:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
02-10-2020
07:28 AM
Feb 2020, and I'm having the same issue.
I can create a 3DA leader in my .ipt file with model parameters inserted in the text,
but I cannot recreate the same leader using the API and VB.Net.
I can create a 3DA leader, but an error is thrown when updating the text to include a parameter xml tag.
System.ArgumentException: 'The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))'
FYI: I used ilogic to extract the parameter xml tag from an existing leader I wanted to duplicate.
Dim oDoc As PartDocument = ThisApplication.ActiveDocument Dim oDef As PartComponentDefinition = oDoc.ComponentDefinition Dim oAnns As ModelAnnotations = oDef.ModelAnnotations Dim oLeader As ModelLeaderNote = oAnns.ModelLeaderNotes.Item(1) Dim oText As String = oLeader.Definition.Text.FormattedText
InputBox("",,oText)