Message 1 of 5
iLogic issue: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

Not applicable
10-27-2021
03:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Good morning everyone. I have experienced strange issue with inventor. Previously I've prepared code in order to prepare element with length scale in millimeters (to create numbers automatically). Everything was working fine. I've made already two parts in this way. However trying to make a third one I'm experiencing this error message: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)). Please see code below:
Dim oDoc As PartDocument oDoc = ThisApplication.ActiveDocument Dim oSketch As PlanarSketch oSketch = oDoc.ComponentDefinition.Sketches.Item(9) Dim sText As String Dim oInsertPoint As Point2d Dim oTextBox As TextBox For i=0 To 20 sText=i * 10 oInsertPoint=ThisApplication.TransientGeometry.CreatePoint2d(i,1) oTextBox = oSketch.TextBoxes.AddFitted(oInsertPoint, sText) oTextBox.Style.HorizontalJustification = kAlignTextCenter Next
Does anyone have idea what's wrong?
Thanks in Advance for your help!