• No results found

__New_Object

In document PSProfDeveloperManualEnglish (Page 179-185)

Opens the New record dialog window for a freely definable EntityType.

Syntax

___New_Object ( <EntityTypeObject> );

Parameters

<EntityTypeObject>

The New record dialog window for this EntityType object is opened. Productstream Professional expressions may be used.

Return Values

Notes

The rights for the given EntityType object are checked. The condition only returns TRUE and can be executed if Create and Write rights have been granted.

If Productstream Professional Easy is being used, the valid EntityType objects are also checked.

The specified EntityType object must have been correctly entered in the configuration.

The function itself does not perform any further actions, but only calls the public function New_Object with the same parameters which must be found using the object model. This is where the call function for the New record dialog window is implemented.

The function is usually launched directly from the menu! It is therefore regarded as an exception as far as the convention that all functions used in menu files should begin with m_ is concerned.

Examples

Opening the New record dialog window for a product:

___New_Object ( AIM.PART );

See also

Formatting Variables

Value Description

0 Command executed successfully

unequal to 0 Error (no further details given, error message in the file errlog.err)

166

___NotInstalled

No function.

Syntax

___NotInstalled ();

Parameters

<None>

Return Values

Notes

This is just a dummy function.

___OnePropUpdate

Updates the file behind the current object. Write protection and rights are temporarily disabled.

Syntax

___OnePropUpdate ( [<Parameter>] );

Parameters

[<Parameter>]

The given parameters are passed on to the public function OnePropUpdate . Productstream Professional ex-pressions may be used.

Return Values

? Return value for the function OnePropUpdate or

0: Command executed successfully

-1: No RecordBuffer or DocumentType object context -3: No file names available (no DocumentType object) -4: No file available

-5: Untreated exception in the public function OnePropUpdate

unequal to 0: Error (no further details given, error message in the file errlog.err) Notes

Any write-protection flag on the file is disabled for the duration of the function call. Write rights are also as-signed. The Access Control List is modified by an existing Productstream Professional Access Control Manager. These changes are cancelled when the function finishes.

See also

Formatting Variables

Value Description

1 Command executed successfully

167

___OpenArchiv

Opens a new Productstream Professional dialog window. This must be a GUIView object as a Folder element.

Syntax

___OpenArchiv ( <GUIViewObject> );

Parameters

<GUIViewObject>

The new dialog window is opened in the GUIView <GUIViewObject>. The specified GUIView object must be compatible with the current object and it must be a Folder element.

Return Values

Notes

The entire string is substituted in the current object before it is executed.

With many GUIView objects, the attribute DBWHERE is substituted for the object of the parent GUIView object. The object current at the time ___OpenArchive is called becomes the object of this parent GUIView object.

___RecordBuffer or ___OpenGUIViewWindows must be used to open a window for a GUIView object of element type CreateDialog.

Example

Opening the detail dialog window for the current object, type Engineering Document:

___OpenArchive (FolderEngineeringDocument_Detail );

See also

Formatting Variables

Value Description

0 Command executed successfully

unequal to 0 Error (no further details given, error message in the file errlog.err)

168

___OpenGUIViewWindow

Opens a new Productstream Professional dialog window showing the current object. It must be a GUIView object as a CreateDialogElement and be compatible with the current object.

Syntax

___OpenGUIViewWindows ( [-modal] <GUIViewObject> );

Parameters

[-modal]

The dialog window is opened modally, i.e. it remains the only window which can be controlled until it is closed.

<GUIViewObject>

The current object is opened in the GUIView object <GUIViewObject>. The specified GUIView object must be compatible with the current object.

Return Values

Notes

The entire string is substituted in the current object before it is executed.

With many GUIView objects, the attribute DBWHERE is substituted for the object of the parent GUIView object. The object current at the time ___OpenGUIViewWindow is called becomes the object of this parent GUIView object.

___OpenArchive must be used to open a dialog window for a GUIView object of type Folder.

Examples

Opening the New record dialog window for the current office document:

___OpenGUIViewWindow ( Create_Dialog_OfficeDocument );

See also

Formatting Variables

Value Description

0 Command executed successfully

unequal to 0 Error (no further details given, error message in the file errlog.err)

169

___OpenHelp

Opens the online help as defined under HelpFile.

Syntax

___OpenHelp ();

Parameters

<None>

Return Values

Notes

The help file is defined under HelpFile in the file COMPASS.INI in the section [Path].

Value Description

0 Command executed successfully

unequal to 0 Error (no further details given). The message text is documented in the local working directory in the file errlog.err

170

___Prepare

This function substitutes a template file in ASCII format (all expressions and variables with "#" "@" and "$") and writes a target file with the substituted values.

Syntax

___Prepare ("<TemplateFile>""<TargetFile>" [-a] [-c] [-ansi|-utf8|-utf16|-utf16_be|-utf16_le]);

Parameters

"<TemplateFile>"

The path, file name and extension of the template which is to be substituted.

"<TargetFile>"

The path, file name and extension of the target file which is to be substituted.

[-a]

Mode: append. Either append it to the existing target file or generate a new one.

[-c]

Mode: convert. Convert the target file from ASCII to ANSI.

[-ansi|-utf8|-utf16|-utf16_be|-utf16_le]

Mode: define the prefered Unicode format

Return Values

Notes

The expressions and variables are substituted for the current object and context and written to the target file.

The target directory is not created.

Examples

File: copy.vor with the following contents:

xcopy "#(DOCNAME0)" "$(USERPROFILE)\My documents\Productstream Professional" /d /y ↵

The following syntax is used to substitute a template file and to append it to the target file:

___Prepare ( "$(TEMPLATEPATH:|+)copy.vor" "$(WSPATH:|+)copy.bat" –a );

The template file called copy.vor in the folder $(TEMPLATEPATH:|+) is read out, substituted for the current object, and then written to the folder "\Documents and Settings\All Users\Application Data\Autodesk\Pro-ductstream Professional 2009" as copy.bat. If this file already exists, the new contents are appended. If the command is started in this form for multiple objects, a batch file is created which copies all the primary docu-ments to the local directory ...\My Docudocu-ments\ one after the other.

See also

Formatting Variables

Value Description

0 Command executed successfully

unequal to 0 Error (no further details given, error message in the file errlog.err)

171

PrintReport

Prints data using the Report Generator. This function forms the basis for the Report Generators included as standard in Productstream Professional.

Syntax

PrintReport ([{__BOM__|__STRBOM__|__SUMBOM__}] [<MaxLevel>]

{Report|Preview|Layout|Export} <LayoutFile> [Silent] [Keep=<File>]

[Fixed=<RecordBuffer>]);

Parameters

In document PSProfDeveloperManualEnglish (Page 179-185)