DBWGetActiveDocUid

<< Click to Display Table of Contents >>

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

DBWGetActiveDocUid

Description

Returns the Unique Id of the record corresponding to the document currently opened in the CAD application

Syntax

Function DBWGetActiveDocUid()

Return values

The function assumes the values of the record unique ID corresponding to the document currently opened in SolidWorks;

0 if no record found.

Example

Sub main()
 uid=DBWGetActiveDocUid()
 if uid<>0 then
  dbwmsgbox "the currenlty opened document has record unique id = " & uid
 else
  dbwmsgbox "no doc is currently opened in the CAD"
 end if
end sub