AnsweredAssumed Answered

Create new drawing sheet and put it next of active sheet

Question asked by Mikael Bolduc on May 19, 2015
Latest reply on May 20, 2015 by Deepak Gupta

Actualy when I play the macro, it create a new sheet but it put it last sheet

I want to put it next of active sheet.


This is my macro

Dim swApp As Object

Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim NoFeuille As Integer

Sub main()

Set swApp = _

Set Part = swApp.ActiveDoc
NoFeuille = Part.CustomInfo2("", "NoFeuille")
    NoFeuille = NoFeuille + 1
    Part.CustomInfo2("", "NoFeuille") = NoFeuille
boolstatus = Part.NewSheet3("Feuille #" & NoFeuille, 12, 12, 1, 8, False, "Z:\atelier\solidworks\BASE DESSIN SOLIDWORKS COMPLÈTE\Fond de plan\8.5X11 PAYSAGE.slddrt", 0.2794, 0.2159, "Défaut")
Part.ClearSelection2 True
End Sub