Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding a pause to a journal for a Video

Status
Not open for further replies.

PSI-CAD

Computer
Joined
Feb 13, 2009
Messages
997
Location
FR
Hi,

I tried to record some modeling operations in a journal with a pause

Tools / Journal / Record

Then

Tools / Journal / Insert / User Pause

The result code is

Dim theUI As UI = UI.GetUI()

theUI.JournalPause()

And the journal pause, but what's the code to wait some seconds ?

Thanks in advance

Regards
Didier Psaltopoulos
 
The JournalPause() method will pause execution by popping up a dialog box. The journal will suspend execution until you press OK on the dialog box. If you want to pause and restart after a specified amount of time, you can use the Thread.Sleep() method instead. Pass in the time (in milliseconds) to pause execution.

Code:
Option Strict Off
Imports System
Imports System.Threading
Imports NXOpen

Module Module1

    Sub Main()

        Dim theSession As Session = Session.GetSession()

        Dim theUI As UI = UI.GetUI()

        MsgBox("before pause")
        'pause for 5 seconds
        Thread.Sleep(5000)
        MsgBox("after pause")

    End Sub

End Module


www.nxjournaling.com
 
Hi Cowski

Thanks a lot, it works well

Is there a way to reduce the time to execute all the journal duration ?

Thanks in advance

Regards
Didier Psaltopoulos
 
If I understand the question correctly; for a shorter pause, pass in a smaller number (the number represents milliseconds to pause).

Code:
Thread.Sleep(n)

www.nxjournaling.com
 
Hi Cowski,

I was not clear.

For example, If I record some sketch operations and add a pause, I can have the time to see the result

But I would like to reduce the speed to each operation.

Regards
Didier Psaltopoulos
 
So basically a "slow-motion" replay?
You might be able to do that with several sleep statements.
[ol][li]run chunk of journal code[/li]
[li]update display[/li]
[li]sleep[/li]
[li]repeat[/li][/ol]

www.nxjournaling.com
 
It appears that what you're actually asking for is something that would be better accomplished by editing the resulting raw video file itself. With tools like TechSmith's video capture and editing tools, such as Camtasia Studio, you have the ability in post-production to expand and/or compress the apparent speed of the video when it's played-back. Perhaps it would be better to invest in this sort of video editing tool rather than trying to use a journal to FORCE NX to behave in a way where IT IS speeding-up and slowing-down just so that the video, when it's finally captured, will playback the way that you want it to. And if this is something that you will want to do in more than one instance, that investment in the video editing software may provide a very good return over the long haul.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.
 
Good point, that would certainly be easier. Windows includes "movie maker" software that may have the tools to do what you need (I have not used it).

www.nxjournaling.com
 
Capturing the 'raw footage' is not the problem (we've even built that into NX), but rather it's the post-production that will need something more functionality. Certainly Camtasia Studio will do the job, but it's not inexpensive although probably worth serious consideration if this is something that you're wanting to do more than once or twice a year. Now you might be able to find some cheaper tools at there, perhaps even some decent shareware, but irregardless, whatever you find will probably be well worth doing since going the journal route is going to add a lot of complexity to the workflow particularly if it's needs to be repeatable.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top