.NET

Reply
Anonymous(anon)
Posts: 0
Message 1 of 1 (53 Views)

Sheet Set Error

53 Views, 0 Replies
12-27-2005 02:56 PM
I am trying to import a page into the sheet set manager and my program keeps crashing on me...I was wondering if anyone knows about the attached error...By code is below...Thanks in advance for the help...It crashes at the line "oLayoutRef.SetFileName(CurrentDwg)...

Private Sub FormatDWG(ByVal CurrentDwg As String)

Dim oSSM As New AcSmSheetSetMgr
Dim oSheetDB As New AcSmDatabase
Dim oSheet As AcSmSheetSet
Dim strSheetSetFileName As String = Mid(CurrentDwg, 1, Len(CurrentDwg) - 13) & Main.clsJobData.JobNumber & ".dst"

IO.File.Copy("c:\DefaultSheetSet.dst", _
strSheetSetFileName)

oSheetDB = oSSM.OpenDatabase(strSheetSetFileName)
clsSSProp.LockSSDatabase(oSheetDB)
clsSSProp.UpdateSheetSetProps(oSheetDB)

Dim oLayoutRef As New AcSmNamedAcDbObjectReference

oLayoutRef.InitNew(oSheetDB)
<-----------Crashes here ------------->
oLayoutRef.SetFileName(CurrentDwg)
oLayoutRef.SetName("Layout1")
oSheet = oSheetDB.GetDatabase.GetSheetSet.ImportSheet(oLayoutRef)
IsQuiescent(oAcad)
oAcad.ActiveDocument.SendCommand("REGEN")
IsQuiescent(oAcad)
oAcad.ActiveDocument.MSpace = True
IsQuiescent(oAcad)
Dim index As Integer = 0
Do While oAcad.ActiveDocument.Database.Dictionaries.Item(index).ObjectName "MTEXT"
index += 1
Loop
End Sub

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community