Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB Run-time error '438': in Solidworks

Status
Not open for further replies.

ffrreedd

Structural
Jan 23, 2006
9
If I try to use the solidworks / visual basic command:
retval = Sheet.GetProperties ()
I get the following error:
Run-time error '438':
Object doesn't support this property or method.

Any suggestions would be much appreciated.
 
Replies continue below

Recommended for you

I'll bet you are not using the Sheet object properly. How did you obtain the Sheet object? Stick this code in a macro and run it while a drawing is open. It will echo back the drawing scale of the active sheet.
Code:
Option Explicit

Dim swApp As Object
Dim Part As Object
Dim Sheet As Object
Dim retval

Sub main()

    Set swApp = CreateObject("SldWorks.Application")
    Set Part = swApp.ActiveDoc
    
    Set Sheet = Part.GetCurrentSheet
    
    retval = Sheet.GetProperties
    MsgBox "Scale = " & retval(2) & ":" & retval(3)

    Set Sheet = Nothing
    Set Part = Nothing
    Set swApp = Nothing
End Sub
DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor