Hide Table of Contents
PreviewDocx64 Method (ISldWorks)

Displays a preview of a document to the specified window in 64-bit applications.

.NET Syntax

Visual Basic (Declaration) 
Function PreviewDocx64( _
   ByRef HWnd As System.Long, _
   ByVal FullName As System.String _
) As System.Boolean
Visual Basic (Usage) 
Dim instance As ISldWorks
Dim HWnd As System.Long
Dim FullName As System.String
Dim value As System.Boolean
 
value = instance.PreviewDocx64(HWnd, FullName)
C# 
System.bool PreviewDocx64( 
   ref System.long HWnd,
   System.string FullName
)
C++/CLI 
System.bool PreviewDocx64( 
&   System.int64% HWnd,
&   System.String^ FullName
) 

Parameters

HWnd
Window handle where you want the preview bitmap to display; this pointer is not valid across processes; therefore, this method only works if your application is implemented as a DLL
FullName
Full path name of document to preview

Return Value

True if successful, false if not

Remarks

This method is only available through early binding and with 64-bit versions of the SOLIDWORKS software.

The bitmap is stored with the fixed size shown with the interactive SOLIDWORKS preview option. If your window is a different size, then the image is scaled appropriately. If scaling is needed, then shaded images may not be as crisp as the original.

 

This method works well in the WM_PAINT Windows Message handler. If used in WM_ONINITDIALOG the dialog only displays the preview for a brief moment. The reason is that the dialog should be initialized completely before calling SldWorks::PreviewDocx64.

 

C++ programmers can also access this bitmap image from outside SOLIDWORKS. The bitmap was written with CArchive::Write( ) and is found in the Preview node in SOLIDWORKS part, assembly, and drawing files. The format of the Preview node is as follows: DWORD (data size) followed by continues chunk of memory of that size (data). The data being read can be cast to LPBITMAPINFO, which has all of the information required to display the bitmap. You may want to use StretchDIBits() when displaying your image of the bitmap.

 

See Also

Availability

SOLIDWORKS 2006 SP2, Revision Number 14.2


Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   PreviewDocx64 Method (ISldWorks)
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:



x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: API Help (English only) 2018 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.