SWVersionHistory

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Commands Reference > CADSystem >

SWVersionHistory

Description

According to the CAD Application returns in the variable @DATECODE:

the SolidWorks version in the format YYYYDDD

the Inventor version in the format major version.minor version (e.g. "9.1")

Syntax

call DBWShell("SWVersionHistory filename")

Parameters

filename

full path file to know history about.

Please note any space char in filenames and paths must be replaced by "|" char.

Remarks

Please note the use of the | (vertical bar) character instead of the blank one in the file name.

Results

After executing the command, use the Standard Library command DBWResult to check the value of the following parameters:

@DATECODE

file datecode

@MAJORVER

For solidworks integration only, it contains the identification number of the SolidWorks version (e.g. 14000 = Solidworks2021)

See also

See SWVersion command

Example

fname = "f:\samples\examples\handlebar\handle bar complete.sldasm"

call DBWShell ("SWVersionHistory " & replace(fname," ","|")")
fileDateCode = DBWResult("@DATECODE")

'.x64

Sub main
 DBWInit(TRUE)
 DBWShell("CurrentDocument")
 uid = DBWResult("@DOCUMENT_UNIQUE_ID")
 fdir = DBWQueryByUid(uid,DBWLookUp("NAME_FIELD_FILE_DIRECTORY"))
 fname = DBWQueryByUid(uid,DBWLookUp("NAME_FIELD_FILE_NAME"))
 fullPath = fdir & fname
 DBWShell ("SWVersionHistory " & Replace(fullPath," ","|"))
 DateCode = DBWResult("@DATECODE")
 majorVer = DBWResult("@MAJORVER")
 DBWMsgbox "majorVer =" & majorVer & vbcrlf & "DateCode =" & DateCode
End Sub