Checks whether #(DOCNAME0) exists. Corresponds to exist("#DOCNAME0") but is faster!
Return value
TRUE: File #(DOCNAME0) exists FALSE: File #(DOCNAME0) does not exist
docexist ( <n> )
Checks whether #(DOCNAME<n>) exists. The document identifier is entered in place of <n> (example: 0 for
#(DOCNAME0)). Corresponds to exist("#DOCNAME<n>")but is faster!
Return value
TRUE: File #(DOCNAME<n>) exists FALSE: File #(DOCNAME<n>) does not exist
Files 95
#( FileType : <FileName> )
This function returns the version of the existing AutoCAD drawing DWG. 0000 is always returned if the file is not a DWG.
Return values
0000: File is not a DWG or it could not be found
ACAD: DWG was created using AutoCAD up to and including version 10 or from 2002 AC11: DWG was creating using AutoCAD 11
AC12: DWG was creating using AutoCAD 12 AC13: DWG was creating using AutoCAD 13 AC14: DWG was creating using AutoCAD 14
AC15: DWG was creating using AutoCAD 2000 or 2000i
#( FindFile "<FileName>" "<SearchPath>" [:<Formatting>] )
Searches for a file in multiple search paths and returns the name of the directory in which it was found.
Parameters
<FileName>
The file name is defined together with the extension. The characters "*" and "?" may not be used. This file must exist. The search is stopped when the file is found. If the specified file does not exist, the path to <File-Name> is cut off if necessary and the file is sought in the directories defined in <SearchPaths>.
Note
If <FileName> does not contain a path, priority is always given to a file in the active working directory!i !
<SearchPaths>
Multiple directories separated by semi-colons can be defined here. The file <FileName> is then sought in the specified sequence in these directories.
<Formatting>
All the format details defined for Productstream Professional expressions can be given here in order to influ-ence the return value.
Return value
<Directory>: File has been found in this directory
"": File has not been found Examples
#(FindFile "aimtitle.txt" "$(CaiPath:|+)acad$(_DS)mdt4; $(CAIPATH: |+)acad; $(CAIPATH)"
)
#(FindFile "aimtitle.txt" "#(DTYAppl #(DTYGetValidAppl EDIT0) FileSearchPath)" )
#( FileNameGen )
Generates a unique file name (field FILE_NAME) which is returned
#( DOCNAME<n> )
The directory, file name and extension of the current object.
The following values can be used for <n>:
0: Primary document
1: Secondary document - PDF (version 5.4 and higher) 2: Secondary document (freely definable)
3: Secondary document (freely definable) 4: Secondary document (freely definable) 5: Secondary document (freely definable)
Files 96
#( PATH<n> )
Internal access path to the documents of the current object.
The following values can be used for <n>:
0: Primary document
1: Secondary document - PDF (version 5.4 and higher) 2: Secondary document (freely definable)
3: Secondary document (freely definable) 4: Secondary document (freely definable) 5: Secondary document (freely definable)
#( EXT<n> )
File extension of the document of the current object.
The following values can be used for <n>:
0: Primary document
1: Secondary document - PDF (version 5.4 and higher) 2: Secondary document (freely definable)
3: Secondary document (freely definable) 4: Secondary document (freely definable) 5: Secondary document (freely definable)
#( EXTFLD<n> )
Name of the fields in which Productstream Professional enters the file extension of the document files as soon as the corresponding document has been created.
The following values can be used for <n>:
0: Primary document
1: Secondary document - PDF (version 5.4 and higher) 2: Secondary document (freely definable)
3: Secondary document (freely definable) 4: Secondary document (freely definable) 5: Secondary document (freely definable)
#( LinkFld )
Name of the field in which the directories, file names and file extensions of primary documents are entered which are not managed by Productstream Professional, but by using external references (default =
FILE_LINKNAME).
#( LinkName )
Directory, file name and extension of an external reference, i.e. of a primary document which is only managed using a reference link and not directly by Productstream Professional. This information is stored in the data-base in the field with the name determined by LINKFLD.
#( PATHFLD<n> )
Name of the field in which the access path to one of the 6 or more documents in a binder can be optionally defined.
#( AIMKEYfromPATH <FileName> )
Here, the file name is used to find the corresponding AIMKEY. The path must be given in quotation marks if the path name itself contains spaces.
Example:
#( AIMKEYfromPATH "$(myFile)" )
#( AIMKEYfromPATH "C::\All drawings\dwg\abc00000.dwg" )
Time 97
#( DescfromPATH <FileName> )
Here, the file name is used to find the corresponding description. The path must be given in quotation marks if the path name itself contains spaces.
Example:
#( DESCromPATH "$(myFile)" )
#( DESCromPATH "C:\All drawings\dwg\abc00000.dwg" )
Time
Functions which return a time zone-neutral value always begin with the 3 upper-case letters "UTC". The re-turn value is a special time value, which cannot be compared with character springs. Time calculations cannot be performed, either.
The earliest possible time is January 1st, 1970, 0:00; the latest possible time is January 18th, 2038, 19:14:07.
#(= UTCFile ( "<File>" ) )
Function for determining the file date of the specified file. The return value is a time value.
Return value Time value: File date -1: Error
#(= UTCSystem ( ) )
Function for determining the current system time. The return value is a time value..
Return value Time value: File date -1: Error
#(= localUTC ( <TimeValue> ) )
This function returns the string produced by the time value.
Return value
"YYYYMMDDhhmmss: "Converted time value -1: Error
#(= gmUTC ( <TimeValue> ) )
This function returns the string produced by the time value. Coordinated universal time is used here.
Return value
"YYYYMMDDhhmmss: "Converted time value -1: Error
#(= strUTC ( <TimeValue> ) )
This function returns a decimal figure produced by the time value.
Return value
>0: Converted time value -1: Error
#(= INT ( <TimeValue> ) )
This function returns an integer figure produced by the time value.
Return value
>0: Integer value from the converted time value -1: Error
Time 98
#(= DOUBLE ( <TimeValue> ) )
This function returns a floating decimal point figure produced by the time value.
Return value
>0 Floating decimal point figure from the converted time value -1 Error
#(= UTC ( <DecimalNumber> ) )
This function returns a time value produced by the decimal figure. The decimal figure can also be defined as a string.
Return value
>0: Time value -1: Error
#(= TIME ( "<YYYYMMDDhhmmss>" ) )
This function returns a time value produced by the string.
Caution!
The function TIME() converts the time from the character string taking into account the time zone or summer/
winter time!
Return value
>0 Time value -1 Error
#( SYSDATE )
Return value is the current system date in the format YYYYMMDD. The following variations can be used:
#( SYSDATE ): YYYYMMDD (same as localUTCSystem())
#(SYSDATE10): DD.MM.YYYY
#(SYSDATE:D10): DD.MM.YYYY
#(SYSDATE8): DD.MM.YY
#(SYSDATE:D8): DD.MM.YY
#( SYSTIME )
Return value is the current system time in the format HHMMSS. The following variations can be used:
#( SYSTIME ): HHMMSS
#(SYSTIME8): HH:MM:SS
#(SYSTIME5): HH:MM Caution!
The hour is filled with a space when defining times between 0-9. This space is deleted when the time is saved in a variable. The time then contains just 5 figures.
Rights 99
Rights
crstatic ( "<Rights>" )
Checks whether the current user has been granted the specified rights for the EntityType object of the current object (this cannot always be achieved using the 4th parameter in the function declaration, as in some cases, e.g. with GetDropEffectFunctions, the function always has to be called, but its behavior has to vary according to the access rights).
This function is required if crdynamic cannot be used (e.g. when creating a new record).
The following characters can be defined as a character string:
C = Create D = Delete R = Read W = Write (Edit) Return values
TRUE: The user has been granted all the access rights defined in <Rights> for the global EntityType object of the current object
FALSE: The user has not been granted all the access rights defined in <Rights> for the global EntityType object of the current object
Example
crstatic ( "C" )
crdynamic ( "<Rights>" )
Checks whether the current user has been granted the specified right for the current object.
The following characters can be defined as a character string:
C = Create D = Delete R = Read W = Write (Edit) Return value
TRUE: The user has been granted all the access rights defined in <Rights> for the current object FALSE: The user has not been granted all the access rights defined in <Rights> for the current object Example
crdynamic ( "RW" )
cr ( "<Rights>" )
Synonymous with the condition function crdynamic.
#( dynamicRights )
This function returns the dynamic rights for the current object:
C = Create (is always static) D = Delete
R = Read (is always given) W = Write (Edit)
Exclusive reservation 100
#( staticRights )
This function globally returns the static rights for the current object as defined in the configuration:
C = Create D = Delete R = Read W = Write (Edit) G = Group right O = Owner right A = Default right