Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Edit Drawing Sketch Text

1 REPLY 1
Reply
Message 1 of 2
meck
263 Views, 1 Reply

Edit Drawing Sketch Text

meck
Collaborator
Collaborator
I want to make a text editor, to edit the text in a sketch in paperspace of a .dwg.
For i = 1 To oSketch.TextBoxes.Count
oSketch.TextBoxes.Item(i).Text = ""
oSketch.TextBoxes.Item(i).Delete
Next
At this point in the code, I have retrieved the text from the textbox, and now want to clear the text, and replace it with new text. The other option is to delete the textbox and replace it with a new textbox at the same position.
I get an Invalid procedure call or argument error with both oSketch.TextBoxes.Item(i).Text = "" and oSketch.TextBoxes.Item(i).Delete.
What changes do I need to make to get this to work?
Thanks!
Mike Eck
Master Drafter/ CAD Programmer
Using Inventor 2018
0 Likes

Edit Drawing Sketch Text

I want to make a text editor, to edit the text in a sketch in paperspace of a .dwg.
For i = 1 To oSketch.TextBoxes.Count
oSketch.TextBoxes.Item(i).Text = ""
oSketch.TextBoxes.Item(i).Delete
Next
At this point in the code, I have retrieved the text from the textbox, and now want to clear the text, and replace it with new text. The other option is to delete the textbox and replace it with a new textbox at the same position.
I get an Invalid procedure call or argument error with both oSketch.TextBoxes.Item(i).Text = "" and oSketch.TextBoxes.Item(i).Delete.
What changes do I need to make to get this to work?
Thanks!
Mike Eck
Master Drafter/ CAD Programmer
Using Inventor 2018
1 REPLY 1
Message 2 of 2
meck
in reply to: meck

meck
Collaborator
Collaborator
Well I answered 1/2 my own question.
I needed to be editing the osketch in order to delete the text. (what a brain cramp!)
Still couldn't get the oSketch.TextBoxes.Item(i).Text = "" to work.
Mike Eck
Master Drafter/ CAD Programmer
Using Inventor 2018
0 Likes

Well I answered 1/2 my own question.
I needed to be editing the osketch in order to delete the text. (what a brain cramp!)
Still couldn't get the oSketch.TextBoxes.Item(i).Text = "" to work.
Mike Eck
Master Drafter/ CAD Programmer
Using Inventor 2018

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report