Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Register Log in

Automatic loading of light.dlg


Is there a way to have the light settings file, light.dlg automatically load when opening Pro/E? I've looked in config.pro and haven't found any options to point to this file. Going into the light editor everytime to load this file is getting old!

Thanks in advance


Unfortunately there is no config.pro option for this. I have created a mapkey with a custom icon I put on my toolbar that reads in a light file.


Here is a way to load Pro/E with settings that don't exist in the config.pro. It involves automatically running a trail file called loadmod.txt at startup.


1. Create a trail file of your menu picks.

2. Modify your Pro/E shortcut icon to read the trail file on startup.

3. Pro/E automatically runs the trail file, which reads in your light settings, shading quality, and whatever else you want it to do.


In this example, I will tell Pro/E to load a light file, modify the shading quality, and show small surfaces.

Create trail file

1. Load up a clean session of Pro/E.

2. Create a new dummy part. You'll need to do this so you can have access to the lights command (and others as needed).

3. Load up a lights file (View > Model Setup > Lights).

4. Modify the shading quality and show small surfaces (View > Model Display > Shade).

5. Erase the current model (File > Erase > Current)

6. Exit Pro/E.

Modify Trail File

7. Open the trail file that you just created. It is called trail.txt.xxx where xxx is the latest number. It is in your startup directory unless otherwise specified in a config.pro setting.

8. Since the trail file recorded you exiting Pro/E, you need to delete those lines at the end of the trail file that tell Pro/E to close.

9. Save the trail file as loadmod.txt and place it in your startup directory if it is not already there.

Modify Shortcut Icon to Point to Trailfile

10. Right-click on your Pro/E shortcut icon.

11. In the Target row, add the path of loadmod.txt in quotes. (See picture below).

View attachment 221

Start Pro/E

12. Start up Pro/E with the shortcut icon you just modified. Pro/E will run the trail file and quickly alter the settings you specified in your trail file.

13. Now you're ready to continue with a normal Pro/E session.

This is a way to load settings at the start up of Pro/E. Remember that your lights setting is only good for one window, so if you want to open more windows, you'll need to open a lights setting for those windows as well. A mapkey is good for this.


Here is my trail file for the above proceedure. Please don't copy and paste this, thinking that it will work for you. Unless your directories are set up exactly like mine and you have the same filenames as mine, it won't work. This is just an example.

!trail file version No. 1151

!Pro/ENGINEER TM 2001 (c) 1988-2001 by Parametric Technology Corporation All Rights Reserved.

~ Activate `main_dlg_cur` `ProCmdModelNew.file`

~ Input `new` `InputPanel1` `d`

~ Input `new` `InputPanel1` `du`

~ Input `new` `InputPanel1` `dum`

~ Input `new` `InputPanel1` `dumm`

~ Input `new` `InputPanel1` `dummy`

~ Activate `new` `InputPanel1` `dummy`

!Command ProCmdModelNewExe was pushed from the software.

~ FocusIn `new_file_opts` `psh_ok`

~ Activate `new_file_opts` `psh_ok`

!23-May-03 14:20:19 Start Z:\start_parts\nam_startpart.prt

!23-May-03 14:20:21 End Z:\start_parts\nam_startpart.prt

!23-May-03 14:20:23 Start D:\proefiles\dummy.prt.1

!23-May-03 14:20:23 End D:\proefiles\dummy.prt.1

!%CIUsing Z:\start_parts\nam_startpart.prt as the template.

~ Select `main_dlg_cur` `MenuBar1` 1 `View`

~ Close `main_dlg_cur` `MenuBar1`

~ Select `main_dlg_cur` `View.cb_view_advanced`

~ Close `main_dlg_cur` `View.cb_view_advanced`

~ Activate `main_dlg_cur` `psh_view_mdldisp`

~ Select `modeldisplay` `ModDsply_Tab` 1 `ModDsply_Layout_Shade`

~ Update `modeldisplay` `ModDsply_SB_ShadeQlty` 4

~ Update `modeldisplay` `ModDsply_SB_ShadeQlty` 5

~ Update `modeldisplay` `ModDsply_SB_ShadeQlty` 6

~ Update `modeldisplay` `ModDsply_SB_ShadeQlty` 7

~ Activate `modeldisplay` `ModDsply_ChkB_SmallSurf` 1

~ Activate `modeldisplay` `ModDsply_PB_OK`

~ Select `main_dlg_cur` `MenuBar1` 1 `View`

~ Close `main_dlg_cur` `MenuBar1`

~ Select `main_dlg_cur` `View.cb_view_mdlsetup`

~ Close `main_dlg_cur` `View.cb_view_mdlsetup`

~ Activate `main_dlg_cur` `psh_view_lights`

~ Select `Light_mgr` `MenuBar1` 1 `file`

~ Close `Light_mgr` `MenuBar1`

~ Activate `Light_mgr` `open`

~ Select `file_open` `Ph_list.Filelist` 1 `light_01.lgh`

~ Activate `file_open` `Ph_list.Filelist` 1 `light_01.lgh`

!%CDLights have been retrieved.

*GEN_MOUSE_L -1.000000 0 0 0.400735 0.386410

~ Activate `Light_mgr` `close`

~ Select `main_dlg_cur` `MenuBar1` 1 `File`

~ Close `main_dlg_cur` `MenuBar1`

~ Select `main_dlg_cur` `File.cb_file_erase`

~ Close `main_dlg_cur` `File.cb_file_erase`

~ Activate `main_dlg_cur` `psh_erase`

~ Activate `0_std_confirm` `OK`

!%CIDUMMY has been cleared.