.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Sheet Set Error

0 REPLIES 0
Reply
Message 1 of 1
Anonymous
158 Views, 0 Replies

Sheet Set Error

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
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost