Register when start command a command

Register when start command a command

ladimirabdala
Advocate Advocate
284 Views
3 Replies
Message 1 of 4

Register when start command a command

ladimirabdala
Advocate
Advocate
I need make a program who get when a command start and when this command terminated. And print or show on MsgBox
like this:

Profile initialized at 16:00
Finished at 16:05
Total time edition on sketch = 00:05 minutes

Extrusion initialized at 16:08
Finished at 16:12
Total time edition on sketch = 00:04 minutes

I have try with some examples but not work.

Anyone can help me with a simple code?
I'm work with VS 2003 (Visual Basic .Net)

Thanks in advance.
Ladimir
0 Likes
285 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Look into the OnActivateCommand and OnTerminateCommand events on the
UserInputEvents object.

Sanjay-

wrote in message news:5240762@discussion.autodesk.com...
I need make a program who get when a command start and when this command
terminated. And print or show on MsgBox
like this:

Profile initialized at 16:00
Finished at 16:05
Total time edition on sketch = 00:05 minutes

Extrusion initialized at 16:08
Finished at 16:12
Total time edition on sketch = 00:04 minutes

I have try with some examples but not work.

Anyone can help me with a simple code?
I'm work with VS 2003 (Visual Basic .Net)

Thanks in advance.
Ladimir
0 Likes
Message 3 of 4

Anonymous
Not applicable
I Ladimir,

I'm not sure that this makes sense. If I understand correctly, you want to
track the total amount of time that's spent constructing a feature. This
time starts when they create the sketch and ends when the feature has been
created. The problem is that the creation of the sketch and fhe feature are
not necessarily a defined sequence of steps. Sketches can be created
independently of any feature and can be used at any time to create any
feature. For example, I could open a new part and create 3 new sketches of
varying complexity. Then I could run the Extrude command and select one to
create an Extrude feature and then run the Revolve command and select
another sketch to create a revolution. I could even share the first sketch
and reuse it to create another revolution.

Because the sketch and feature creation are not tied together I don't
believe it makes sense to try and combine these two distinct steps into a
single timed operation.
--
Brian Ekins
Autodesk Inventor API

wrote in message news:5240762@discussion.autodesk.com...
I need make a program who get when a command start and when this command
terminated. And print or show on MsgBox
like this:

Profile initialized at 16:00
Finished at 16:05
Total time edition on sketch = 00:05 minutes

Extrusion initialized at 16:08
Finished at 16:12
Total time edition on sketch = 00:04 minutes

I have try with some examples but not work.

Anyone can help me with a simple code?
I'm work with VS 2003 (Visual Basic .Net)

Thanks in advance.
Ladimir
0 Likes
Message 4 of 4

ladimirabdala
Advocate
Advocate
This exactly.
I want to enter the total of hours expense in the Inventor.
But I am new in VB and would like if possible a code example. I want to make a EXE and not a DLL.
I received an example show a DLL, but it is still very complex for me. A simple code would help me a lot.
Can be when open a sketch and close it.

Thanks a lot Brian and Sanjay.

Ladimir Abdala
skype = ladimirabdala
0 Likes