Reply
Solved! Go to solution

set specific sheet

Good morning to all,

I am creating a customization to save as pdf from solid edge but i have a problem:
in my dft I have 2dModel and sheet1 but when i save a pdf my result is the 2DModel's pdf and not Sheet1.

I thought two possible way:
* select active the sheet1
* deactive a 2D Model

I tried by VB code to realize one of two possibilities but i don't have a good result.

Can you help me?!

Thank you very much

Francesco

4 REPLIES

Re: set specific sheet

[ Edited ]

The following screenshot is from Spy for Solid Edge . It looks like you can toggle the 2D model view via SheetWindow -> Display2DModelSheetTab.

 

Jason Newell
Applications Architect
www.jasonnewell.net

Re: set specific sheet

Thank you so much for your fast response.

But I don't know exactly how to turn it off. Could you help me again?!

 

Thank you so much

 

Francesco

 

 

Solution
Solution
Accepted by topic author Fred3d
‎08-26-2015 04:32 AM

Re: set specific sheet

Sure thing. Here is the code.

 

Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Runtime.InteropServices
Imports System.Text

Namespace DraftTest
    Friend Class Program
        Shared Sub Main(ByVal args() As String)
            Dim application = DirectCast(Marshal.GetActiveObject("SolidEdge.Application"), SolidEdgeFramework.Application)
            Dim sheetWindow = TryCast(application.ActiveWindow, SolidEdgeDraft.SheetWindow)

            If sheetWindow IsNot Nothing Then
                sheetWindow.Display2DModelSheetTab = False
            End If
        End Sub
    End Class
End Namespace

 

Jason Newell
Applications Architect
www.jasonnewell.net

Re: set specific sheet

Perfect solution Smiley Happy

Thank you very much for your help.

You've been really helpful and you heped me a lot.

thanks again

 

have a nice evening

Francesco