OnOptions.LST script file

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Event Scripts > Options >

OnOptions.LST script file

Description

This script is started instead of the common DBWorks/DBInventor options data form.

The admin can use this functionality to allow/deny the setting of all/certain/none option to users.

Activation

Options→General

Input

@OKOPTIONS

0: cancel the options editing
1: save the options editing

Remarks

The script must be able to edit the options needed because no other options dialog will be shown by DBWorks.

Example

.VBSCRIPT
Sub Main()
 DBWInit(TRUE)
 okdplm = DBWGetOption("OK_DRAWING_PART_LINK_MODE")
 okdplm = InputBox("Please set the Drawing <=> Part Link Mode [0/1]:")
 okonoptions = DBWGetOption("USE_CUSTOMIZED_SCRIPT_ON_OPTIONS")
 okonoptions = InputBox("Do you want to use this script for options editing [0/1] ?")
 if okdplm<>"" and okonoptions<>"" then
  DBWSetOption "OK_DRAWING_PART_LINK_MODE",okdplm
  DBWSetOption "USE_CUSTOMIZED_SCRIPT_ON_OPTIONS",okonoptions
  DBWOutput "@OKOPTIONS","1",ForWriting
 End if
end sub