DBWGetDocType

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Library Reference > Document >

DBWGetDocType

Description

Retrieve the current document type according to its file extension

Syntax

Function DBWGetDocType(FileName, ByRef SWType)

Parameters

filename

file name

Return Values

The function returns the type of the current document.

SWType

integer describing the SolidWorks internal coding for the current document type

Here below, you can find document types in the internal coding of SolidWorks and DBWorks.

SolidWorks

DBWorks

type

0

G

generics

1

P

parts

2

A

assemblies

3

D

drawings

Example

filename="c:\spinkler.sldasm"
DBWtype = DBWGetDocType(filename, swtype)
msgbox "The selected documenthas a DBWorks type = " & DBWType & _
"and a SolidWorks type = " & swtype