Olaf Corten's OCUS help page for demomakemovie

Help and/or history for demomakemovie

See also entry in DESCRIPTION file

  NAME
	demomakemovie - Pro/ENGINEER movie creator by F.Rood
			release:	960216
			former releases:951206, 950731
			tested on: 	Pro/ENGINEER Version 14.0 - 9503
					Pro/ENGINEER Version 15.0 - 9537
			based on:	IRIX Execution Environment 1, 5.2 Indy
					dmedia_tools.sw.movietools
  SYNOPSIS
  				MODE
				 |
	demomakemovie [options] movie [number_of_snapshots]/[start]
	demomakemovie [options] trail [startvalue] [endvalue] [increment]
	demomakemovie [options] test  [startvalue] [endvalue] [increment]
	demomakemovie [options] intf  [startvalue] [endvalue] [increment]

  DESCRIPTION
	demomakemovie has several functions. The most interesting function
	is creating a movie of your Pro/ENGINEER assembly. It was
	originally designed to do so, but the script has some spin-off
	in the shape of additional functions. These functions all imply
	making trailfiles which can be run in Pro/ENGINEER.
	
  OPTIONS
  	-h		this help screen
	-o		use the old scrsave utility
			If the -o option is not used it will make a snapshot of
			the entire active Pro/E window regardless of its size,
			otherwise it will make a snapshot of the lower left
			corner of your screen.
	-r		use a soft regenerate
			Normally it will perform a "#regenerate; #automatic"
			TWICE to ensure a proper regeneration, but this might
			take a long time. If the -r option is set it will
			perform only a "#regenerate; #done" ONCE, which (if
			your assembly regenerates correctly) is much faster.
	-a x		perform an automatic regenerate x times (default 2).
	-f n		set number of frames of the moviefile to n (default: 10)
	-m NAME 	set moviefilename to NAME (default: demo_movie.mv)
	-t NAME 	set trailfilename to NAME (default: demotrail.txt)
	-w X1 X2 Y1 Y2	Set scrsave window coordinates. The default values
			are:	X1 = 9
				X2 = 609
				Y1 = 9
				Y2 = 609
	-l LOOPMODE	Set loop mode: loop, swing (default), once
	-s		Add shade command before each screen save.

	The -o option overrules the -w option.

  MODE
	movie	Will make a snapshot of a specified area of your screen.
		The snapshot will be written to a file tmpdemo.1001 in
		the current directory. The next time the command is executed
		a new snapshot will be made and written to tmpdemo.1002, etc...
		You can specify the number of snapshots by the option
		[number_of_snapshots]. When you execute the command for the
		number_of_snapshot'th time, all the snapshots will be 
		combined to a movie called "demo_movie.mv".
		The snapshots tmpdemo.1001 to tmpdemo.number_of_snapshots 
		will be deleted.
		You can always alter the movie with "moviemaker" (IRIX)
		afterwards. It's wise to change the name of demo_movie.mv to
		a name of your own. When you don't, demo_movie.mv will be
		overwritten when creating a new movie. When you cancel the
		operation before the number of tmpdemo.* files has reached
		the "number_of_snapshots" value you need to delete all
		temporary files. To do so execute demomakemovie with the option
		movie and start.
		Example: demomakemovie movie start
		You can adjust the size of the snapshotwindow by editing	
		"demomakemovie" and change the "WIN_"-values.

	trail	This option enables you to create a trailfile which can be
		run in Pro/ENGINEER. In this trailfile a parameter called
		"CHANGE1" will be incremented with a value and within a range
		given by you. The parameter can drive a dimension of your choice.
		When the trailfile is run the values will be passed to "CHANGE1"
		and the assembly will be regenarated twice (twice, when you
		you've got a assembly dependent part, like a belt, you need
		double regenaration to get the final result). After regeneration
		"demomakemovie" will be called for via the utilities menu.

		Creating a movie with Pro/ENGINEER:
		The option "trail" gives you the opportunity to create a movie.
		To do so you have to follow these steps:
		 (1) Always make an assembly. When you want to increment only
		     a value of one part you need to make an assembly which
		     contains this part.
		 (2) In the assembly make a numerical parameter called "CHANGE1"
		     SET UP, PARAMETERS, CREATE, NUMBER, CHANGE1, 0
		 (3) Show the dimension you want to increment add the relation:
		     d0:1=CHANGE1
		     (d0:1 can be any dimension you wish to increment).
		 (4) Change the value of CHANGE1 in the minimum value of your
		     range (SET UP, PARAMETERS, MODIFY) and regenerate.
		     Do the same for the maximum value of the range. This
		     is a test to make sure CHANGE1 can be altered over the
		     complete range.
		 (5) Save the assembly.
		 (6) Quit Pro/E and start a winterm.
		 (7) Go to a directory on your local machine. If your
		     HOME-directory is situated on the local machine you
		     can stay in your HOME-dir.
		     Excecute the demomakemovie command (you have to give
		     the complete path, or make a copy to your current dir.
		     Example:
		     demomakemovie trail 10 100 5
		     In the example a trailfile will be created with values
		     of CHANGE1 ranging from 10 to 100 with an increment of 5.
		 (8) demomakemovie will add some lines to the menudef.pro in
		     your HOME-dir. Make sure you don't start Pro/E with an
		     other menudef.pro.
		 (9) Start Pro/E.
		(10) You should find two extra options in a the menu: MISC,
		     UTILITIES: Snapshot and Snapinit. With Snapshot you should
		     make a snapshot of a part of your screen. Show the snapshot
		     to determine the size of it.
		     Example:
		     imgview tmpdemo.1001 (in the curren Pro/E-diredtory)
		     Now resize the Pro/E window to fit the snapshot and
		     place the window in the under-left-corner of the screen.
		(11) Place the assembly in the view you would like to make a
		     demo off. In ENVIRONMENT turn off datums, datum points,
		     tolerances and turn on shade.
		(12) Run the trailfile called demotrail.txt.
		     Your work has finished. If everything runs smoothly, wait
		     until the movie is made. DON'T MOVE WINDOWS OVER THE SCREEN
		     WITH THE TRAILFILE RUNNING !!. All screeninfo in the
		     left corner will be recorded.
		     If the trailfile doesn't complete its job and Pro/E 
		     crashes you probably have a value which cannot be
		     regenarated. Check the trailfile for that value 
		     (linenumber is mentioned by Pro/ENGINEER).
		     Make a new trailfile with an other increment, or manually
		     edit the trailfile to change the critical value.
		     A method of preventing Pro/E to crash when the trailfile
		     is 'out of sequence', is set the environment variable
		     CONTINUE_FROM_OOS to true.
		     Example:
		     setenv CONTINUE_FROM_OOS 1
		     You can add this as a line in the .cshrc-file.

		As you will probably see in your first demo_movie.mv, Pro/E
		scales the view dependent of the position of your moving
		part. This effect is an advantage in normal use of Pro/E,
		but in a movie it's not nice. To prevent Pro/E from rescaling
		make a part which consist of datum planes which is larger than
		the maximum size of your assembly. Start with default datum
		planes and place 6 datum planes at an offset from the three 
		planes (in opposite pairs of 2). Place this part in the middle
		of the assembly, fixed to the parts you do not want to be moved.	
		    
	test	The option "test" works just like "trail" but without the
		creation of snapshots and a movie. You can use it to test
		before you use "trail", or just use it to step through
		the value you want to change. This is very handy when you
		want to see whether your assembly can make the movements
		you disigned it for.
		You can make the trailfile in the same way as described above.
		Example:  
		demomakemovie test 10 100 5
		Run the trailfile in Pro/E by calling for: "testtrail"		
		ALWAYS SAVE BEFORE YOU RUN THE TRAILFILE !!
	        A method of preventing Pro/E to crash when the trailfile
		is 'out of sequence', is set the environment variable
		CONTINUE_FROM_OOS to true.
		Example:
		setenv CONTINUE_FROM_OOS 1
		You can add this as a line in the .cshrc-file.

	intf 	The option "intf" has nothing to do with making movies. It's
		an option for creating a trailfile to do interferance check in
		Pro/ENGINEER. Likewise "trail" and "test", the "intf" option
		allows you to create a trailfile in which the parameter "CHANGE"
		will be incremented. After an increment and a regenration the
		trailfile does a global interference check.
		You can read the trailfile which is created by Pro/E to look
		for interfering parts.
		This option is very useful for checking large assemblies with
		moving parts. You can run the trailfile at night, and check
		the trailfile in the morning.
		Example:  
		demomakemovie intf 10 100 5
		Run the trailfile in Pro/E by calling for: "intftrail"		
		ALWAYS SAVE BEFORE YOU RUN THE TRAILFILE !!
		A method of preventing Pro/E to crash when the trailfile
		is 'out of sequence', is set the environment variable
		CONTINUE_FROM_OOS to true.
		Example:
		setenv CONTINUE_FROM_OOS 1
		You can add this as a line in the .cshrc-file.

 
  EXAMPLES
	demomakemovie movie 50		creating a movie containing 50 frames
	demomakemovie movie start	intialize "demomakemovie movie"
	demomakemovie trail 10 100 5	creating trailfile for making a movie
	demomakemovie test 10 100 5	creating trailfile for making a testtrail
	demomakemovie intf 10 100 5	creating trailfile for an interference
					check
  SEE ALSO
	makemovie	moviemaker
	movieplayer	imgview
	scrsave
  BUGS
     01	You can't give a fractional input to the trailmaking part of this
	script. Work-around: multipli the value to make your value an integer.
	Divide by this factor in the relations of the Pro/ENGINEER model.
	Example: Let's say you want to make a movie with the driven value
	in the range of 0.1 to 10 with an increment of 0.2. Multiply by 10
	and make a trailfile with these values:

	demomaketrail trail 1 100 2

	In the relations of your assembly you add the following equation:
	d1:1=CHANGE1/10		Where d1:1 is the driven value.

     02	Sometimes the created movie "demo_movie.mv" is not recognized as such
	by IRIX (I don't know why). You can't start the movie by double-clicking.
	Work-around: read the file in moviemaker and store it again.
	Example: moviemaker demo_movie.mv

     03 If a trailfile doesn't complete its job and Pro/E crashes you probably
	have a value which cannot be regenarated. Check the trailfile for that
 	value (linenumber is mentioned by Pro/ENGINEER).
	Work-around:
	Make a new trailfile with an other increment, or manually edit the 
	trailfile to change the critical value.	
	A method of preventing Pro/E to crash when the trailfile
	is 'out of sequence', is set the environment variable
	CONTINUE_FROM_OOS to true.
	Example:
	setenv CONTINUE_FROM_OOS 1
	You can add this as a line in the .cshrc-file.

  AUTHOR
	F. Rood		The Netherlands
	E-Mail: 	F.Rood@TECHNET.IAF.NL

################################################################################
# History:
# 
# 19990219 Changed SCRIPTS_DIR extraction.
# 19970709 Added -s option.
# 19970220 Changed -a option to -a x. Added -l option.
# 19961122 LS_COMMAND decide added (fix for non-SGI users)
# 19961004 Toggled -o functionality
# 19960723 Changed SCRIPTS_DIR setting.
# 19960409 Fixed creation of trailtrail.txt.
#	   Changed trailfile version to No. 811 Rel. 15 (disappearing
#	   X-Section button from setup menu).
# 19960327 Added options (-h,-o,-r,-f,-m, -t and -w). makemovie
#	   now runs in the background. Only the configured snapshot
#	   script will be created in your HOME directory.
# 19960216	
# 19951206	
# 19950731 first version
#
################################################################################