Maybe someone else has a clue what is going on here:
The sourcecode of the show is like follow:
As you can see, I have disabled the previous error message:
But the code can only be reached if the PPviewer.Init has been successful. So I think that it is out of my scope to help at this point as it seems to me ldvlib.dll related.
On the other hand DATHeader works!
That section looks like this:
Any ideas on how to catch where the real problem is?? I am looking for your help. If a special build is needed - no problem.
The sourcecode of the show is like follow:
Code:
Private Sub ShowPartInPreviewLDV(ByVal file As String, ByRef handle As IntPtr)
Try
If PPviewerOn Then
Me.UserStatusInfo.Text = "Load for viewing: " & file
Me.Cursor = Cursors.WaitCursor
Application.DoEvents()
PPviewer.LoadModel(file)
PPviewer.Update()
Me.UserStatusInfo.Text = ""
Me.Cursor = Cursors.Default
Application.DoEvents()
Else
If IsNothing(PPviewer) Then
PPviewer = New XMPD.LDView.Viewer
End If
If PPviewer.Init(handle) Then
PPviewerOn = True
With PPviewer
'.BackgroundRGB = System.Drawing.Color.White
.BackgroundRGB = ViewerBackgroundColor
.SetDefaultRGB(Me.ViewerDefaultColor.R, Me.ViewerDefaultColor.G, Me.ViewerDefaultColor.B, False)
.BFC = False
.BlackEdges = False
.BlueNeutralFaces = False
.BoundingBoxesOnly = False
.DrawWireframe = False
.EdgesOnly = False
.EnableInput = True
.Lighting = True
.LineSmoothing = True
.LowQualityStuds = False
.ShowsConditionalEdges = True
.SubduedLighting = True
.FOV = 10
.SeamWidth = 0
.CheckPartsTracker = False
.PrimitiveSubstitution = True
.ShowsEdges = True
End With
Me.UserStatusInfo.Text = "Load viewer"
Me.Cursor = Cursors.WaitCursor
Application.DoEvents()
If Not PPviewer.LoadModel(file) = True Then
'MessageBox.Show("Viewer could not build the file.")
End If
Me.UserStatusInfo.Text = ""
Me.Cursor = Cursors.Default
Application.DoEvents()
Else
MessageBox.Show("Viewer could not be initialized.")
PPviewerOn = False
End If
End If
Catch ex As Exception
MessageBox.Show(ex.Message & vbCrLf & ex.StackTrace & vbCrLf & ex.Source, "Error in ShowPartInPreview", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1)
End Try
End Sub
As you can see, I have disabled the previous error message:
Code:
If Not PPviewer.LoadModel(file) = True Then
'MessageBox.Show("Viewer could not build the file.")
End If
On the other hand DATHeader works!
That section looks like this:
Code:
If gboolViewerReady = True Then
Me.ToolStripStatusLabel1.Text = "Loading picture ..."
Me.Cursor = Cursors.WaitCursor
Application.DoEvents()
gLDViewer.LoadModel(gstrFileName)
Me.Cursor = Cursors.Default
Me.ToolStripStatusLabel1.Text = ""
Application.DoEvents()
Else
gLDViewer = Nothing
XMPD.LDView.Viewer.SetLDrawDir(XMPD.xmpd_LdrawBasePath)
XMPD.LDView.Viewer.SetRegistryApplicationName(gLDViewerApplication)
gLDViewer = New XMPD.LDView.Viewer
If gLDViewer.Init(Me.PanViewer.Handle) = True Then
'Default values set
gboolViewerReady = True
gLDViewer.BackgroundRGB = System.Drawing.Color.FromArgb(gLDViewerBackgroundColor)
gLDViewer.BFC = Me.mnuBFCToolStripMenuItem.Checked
gLDViewer.BlueNeutralFaces = Me.mnuShowBlueUndeterminedToolStripMenuItem.Checked
gLDViewer.GreenFrontFaces = Me.mnuShowGreenFrontfacesToolStripMenuItem.Checked
gLDViewer.RedBackFaces = Me.mnuShowRedBackfacesToolStripMenuItem.Checked
gLDViewer.RandomColors = Me.mnuRandomColorsToolStripMenuItem.Checked
gLDViewer.CheckPartsTracker = Me.mnuCheckPartsTrackerToolStripMenuItem.Checked
gLDViewer.LowQualityStuds = False
gLDViewer.PrimitiveSubstitution = Me.mnuPrimitiveSubstitutionToolStripMenuItem.Checked
gLDViewer.ShowsAxes = Me.mnuShowAxesToolStripMenuItem.Checked
gLDViewer.ShowsConditionalEdges = Me.mnuShowCondEdgelinesToolStripMenuItem.Checked
gLDViewer.ShowAllConditionalEdges = Me.mnuShowAllCondEdgelinesToolStripMenuItem.Checked
gLDViewer.ShowsEdges = Me.mnuShowEdgelinesToolStripMenuItem.Checked
gLDViewer.BlackEdges = Me.mnuAlwaysBlackEdgesToolStripMenuItem.Checked
gLDViewer.EdgesOnly = Me.mnuShowOnlyEdgelinesToolStripMenuItem.Checked
gLDViewer.TextureStuds = Me.mnuLogoOnStudsToolStripMenuItem.Checked
gLDViewer.DrawWireframe = Me.mnuWireframeToolStripMenuItem.Checked
gLDViewer.RemoveHiddenLines = Me.mnuRemoveHiddenLinesToolStripMenuItem.Checked
gLDViewer.WireframeFog = Me.mnuFogToolStripMenuItem.Checked
gLDViewer.Lighting = Me.mnuLightningToolStripMenuItem.Checked
gLDViewer.UsesSpecular = Me.mnuSpecularHighlightToolStripMenuItem.Checked
gLDViewer.SubduedLighting = Me.mnuSubduedLightningToolStripMenuItem.Checked
gLDViewer.LineSmoothing = Me.mnuLineSmoothingToolStripMenuItem.Checked
gLDViewer.BoundingBoxesOnly = Me.mnuBoundingBoxesToolStripMenuItem.Checked
gLDViewer.Texmaps = Me.mnuTextureMapsToolStripMenuItem.Checked
'gLDViewer.TextureFilterType = Viewer.LDVTextureFilterType.LDVTFTTrilinear
gLDViewer.FOV = 10
gLDViewer.SeamWidth = 0
Me.ToolStripStatusLabel1.Text = "Loading picture ..."
Me.Cursor = Cursors.WaitCursor
Application.DoEvents()
gLDViewer.LoadModel(gstrFileName)
Me.Cursor = Cursors.Default
Me.ToolStripStatusLabel1.Text = ""
Application.DoEvents()
Else
gboolViewerReady = False
End If
End If
Any ideas on how to catch where the real problem is?? I am looking for your help. If a special build is needed - no problem.