Message 1 of 4
Errore Code Insert Sketch Symbol via API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a problem to insert a symbol via API with multiple fields to be filled. The following codes show the same function: the first one with variables set to code and functioning, the second with the variables set via the form, and with an error of "call".
First code (OK):
Dim astrPrompts(0 To 7) As String astrPrompts(0) = "1" astrPrompts(1) = "2" astrPrompts(2) = "3" astrPrompts(3) = "4" astrPrompts(4) = "5" astrPrompts(5) = "6" astrPrompts(6) = "7" astrPrompts(7) = "8" Set oSketchedSymbol2 = osheet.SketchedSymbols.Add(oSymDef4, oTG.CreatePoint2d(i2, j2), 0, 1, astrPrompts)
Second Code (Run-time error '5': Invalid procedure call or argument):
Dim astrPrompts(0 To 7) As String astrPrompts(0) = rugosità_gen.chiuso.Text astrPrompts(1) = rugosità_gen.grezzo.Text astrPrompts(2) = rugosità_gen.rug_gen.Text astrPrompts(3) = rugosità_gen.rug_parz1.Text astrPrompts(4) = rugosità_gen.rug_parz2.Text astrPrompts(5) = rugosità_gen.rug_parz3.Text astrPrompts(6) = rugosità_gen.rug_parz4.Text astrPrompts(7) = rugosità_gen.rug_parz5.Text Set oSketchedSymbol2 = osheet.SketchedSymbols.Add(oSymDef4, oTG.CreatePoint2d(i2, j2), 0, 1, astrPrompts)
I think the error is caused by astrpromps. Thank You
