how to use the command DrawingEditFieldTextCmd

how to use the command DrawingEditFieldTextCmd

Anonymous
Not applicable
633 Views
3 Replies
Message 1 of 4

how to use the command DrawingEditFieldTextCmd

Anonymous
Not applicable
Hi,

I wrote a program try to launch the EditFieldText command of a symbol, which includes prompted strings.
The process:

1, Try to use add the symbol into selectset
2, Try to run excute of DrawingEditFieldTextCmd

The edit dialog can pop up, can input any strings ,but Inventor crashed after click ok button

Any suggestion for this ?
0 Likes
634 Views
3 Replies
Replies (3)
Message 2 of 4

Mike.Wohletz
Collaborator
Collaborator
Can you post your code and the IV version you are using?
0 Likes
Message 3 of 4

Anonymous
Not applicable
Hi Mike, thanks for your reply.

The code is not at my current machine, it's simple, and my inventor build is 2011

In my further investigation, it's no problem to call this process in normal cases.

But I call it in Inventor interaction event OnMouseDown, then it would be crashed every time.

is there any conflict? How can I avoid it?


By the way, after Edit Field Text dialog pops up, is there any method that I can input the strings into the dialog by API?
0 Likes
Message 4 of 4

Mike.Wohletz
Collaborator
Collaborator
I am not sure of what all is going on in the OnMouseDown events in 2011, but it would be my first guess that your program is crashing because of some other process that has started on this event, my personal opinion would be to not use this event to do what you want and assign your program to a shortcut key that you can then click the item and then run your code and grab the item from the selection set. I say this because what is going to happen when you just want to move the item or delete it and this event is firing when you click the item each time.
if you want a one click item for this you can probably use the OnChangeSelectionSet and see if it contains GeneralNote and then deal with each GeneralNote in your selection set in your code and see if that will cause a crash.
Yet again I cannot tell without seeing code and perhaps you are already handling these things. I guess that my best advice right now is to use the event watcher and see what is happening on mouse down (if this is a watchable item) to start with and maybe someone more intelligent than I will drop in with some better advices.
0 Likes