İçindekiler'i Gizle

Functions for Variables

In creating variables, use string and arithmetic functions to configure their values. You can add these functions by clicking right arrow next to Value fields in dialog boxes.

String Functions

Function

Left

Description

Returns the leftmost specified number of characters from a specified string.

Syntax

Left(<string>,<number>)

Arguments

<string> - The character string

<number> - The number of characters to be returned

Example

Left(ProjectAA,7)

Returns "Project"

Function

Right

Description

Returns the rightmost specified number of characters from a specified string.

Syntax

Right(<string>,<number>)

Arguments

<string> - The character string

<number> - The number of characters to be returned

Example

Right(ProjectAA,2)

Returns "AA"

Function

Mid

Description

Returns a substring from a specified string (starting at a specified position).

Syntax

Mid(<string>,<startpos>,<number>)

Arguments

<string> - The character string

<startpos> - The number of the starting position. The first character is position 0.

<number> - The number of characters to be returned

Example

Mid(ProjectAA,2,2)

Returns "je"

Function

Length

Description

Returns the length of a specified string.

Syntax

Length(<string>)

Arguments

<string> - The character string

Example

Length(ProjectAA)

Returns 9

Function

Reverse

Description

Returns the reverse of a specified string.

Syntax

Reverse(<string>)

Arguments

<string> - The character string

Example

Reverse(stockholm)

Returns "mlohkcots"

Function

Find

Description

Searches a specified string for the first match of a character or substring. Returns the position where the character or substring is found.

The first position in the character string is 0.

Syntax

Find(<string>,<substring>)

Arguments

<string> - The character string

<substring> - The character substring for which to search

Example

Find(abc,b)

Returns 1

Function

ReverseFind

Description

Searches a specified string for the last match of a character. Returns the position where the last occurrence of the character or substring is found.

The first position in the character string is 0.

Syntax

Find(<string>,<substring>)

Arguments

<string> - The character string

<substring> - The character substring for which to search

Example

ReverseFind(abcabc,b)

Returns 4

Function

CurrentTime

Description

Returns the current date or time in a specified format

Syntax

CurrentTime(%%Y-%%m-%%d %%H:%%M:%%S)

Arguments

%%a - Abbreviated weekday name

%%A - Full weekday name

%%b - Abbreviated month name

%%B - Full month name

%%c - Date and time representation appropriate for locale

%%d - Day of month as decimal number (01 - 31)

%%H - Hour in 24-hour format (00 - 23)

%%I - Hour in 12-hour format (01 - 12)

%%j - Day of year as decimal number (001 - 366)

%%m - Month as decimal number (01 - 12)

%%M - Minutes as decimal number (00 - 59)

%%p - Current locale's A.M./P.M. indicator for 12-hour clock

%%S - Seconds as decimal number (00 - 59)

%%U - Week of year as decimal number, with Sunday as first day of week (00 - 53)

%%w - Weekday as decimal number (0 - 6; Sunday is 0)

%%W - Week of year as decimal number, with Monday as first day of week (00 - 53)

%%x - Date representation for current locale

%%X - Time representation for current locale

%%y - Year without century, as decimal number (00 - 99)

%%Y - Year with century, as decimal number

%%z,%%Z - Either the time zone name or abbreviation, depending on registry settings; no characters if time zone is unknown

%%%% - Percent sign

Examples

CurrentTime(%%y%%m%%d)

Returns "050113"

CurrentTime (%%H:%%M)

Returns "09:53"

Arithmetic Functions

Function

Add

Description

Returns the sum of the two specified numbers.

Syntax

Add(<term1>,<term2>)

Arguments

<term1> - First term

<term2> - Second term

Example

Add(2,3)

Returns 5

Function

Sub

Description

Returns the difference between the two specified numbers.

Syntax

Sub(<term1>,<term2>)

Arguments

<term1> - First term

<term2> - Second term (amount to be subtracted)

Example

Sub(3,2)

Returns 1



Bu başlık hakkında geribildirimde bulunun

SOLIDWORKS; dokümantasyonun sunumu, doğruluğu ve bütünlüğü hakkında geribildiriminizi almaktan memnuniyet duyar. Bu başlık ile ilgili yorum ve önerilerinizi, aşağıdaki formu kullanarak doğrudan dokümantasyon takımımıza yollayın. Dokümantasyon takımı teknik destek sorularına yanıt veremez. Teknik destek ile ilgili bilgiler için buraya tıklayın.

* Gerekli

 
*Email:  
Konu:   Yardım Başlıkları Hakkında Geribildirim
Sayfa:   Functions for Variables
*Yorum:  
*   Kişisel Bilgilerimin Dassault Systèmes tarafından kullanılacağının belirtildiği gizlilik politikasını okuduğumu ve kabul ettiğimi onaylıyorum

Yazdırma Başlığı

Yazdırılacak içeriğin kapsamını seçin:

x

Internet Explorer 7'den daha eski bir tarayıcı sürümünü kullandığınızı tespit ettik. Optimize edilmiş görünüm için tarayıcınızı Internet Explorer 7 veya daha yenisine yükseltmenizi öneririz.

 Bu mesajı bir daha asla gösterme
x

Web Yardım İçerik Sürümü: SOLIDWORKS PDM 2014 SP05

SOLIDWORKS içindeki Web yardımını devre dışı bırakmak ve onun yerine yerel yardımı kullanmak için Yardım > SOLIDWORKS Web Yardımını Kullan öğelerine tıklayın.

Web yardımı arabirimi ve araması ile ilgili karşılaştığınız sorunları lütfen yerel destek temsilcinize bildirin. Yardım başlıkları hakkında ayrı ayrı geri bildirimde bulunmak için ilgili başlığın sayfasından "Bu başlık hakkında geribildirim" bağlantısına tıklayın.