I have a real complex question (at least think so).
CommandFlags.Session Vs Not using this
It involves a few things:
- Form
- Side Databases
- ReWritten Code of BlockView.NET sample from AutoDESK as a custom control
In principal its a blockfinder is a tool that findes blocks in certain locations (i.e. Network, Local Drive etc).
It lists the files (say in Control A) and when I select a file (From Control A) it shows a preview in our custom control (Control B) of the drawing.
Also if this selected file (From Control A) has Blocks inside it, it lists them in control C and if selected from that control is also displays a preview (Control B).
If the command is defined with the below method on some machines it crashes when reading the side databases but only on some machines.
<Autodesk.AutoCAD.Runtime.CommandMethod("BLOCKFINDER", Autodesk.AutoCAD.Runtime.CommandFlags.Session)> _
Public Sub BlockFinder()
Try
DisplayDialog()
Catch ex As Exception
MsgBox(ex)
End Try
End Sub
Sub DisplayDialog()
Try
Dim BlockFinderForm As New BlockFindForm
Autodesk.AutoCAD.ApplicationServices.Application.ShowModalDialog(BlockFinderForm)
Catch ex As Exception
MsgBox(ex)
End Try
End Sub
This case it doesn't.
<Autodesk.AutoCAD.Runtime.CommandMethod("BLOCKFINDER")> _
Public Sub BlockFinder()
.....
I really just want to understand why this is occuring.
I have read quite a few posts aorund the place and people just say hey if it works do it... But I would like to understand why.
Does anyone else have any experience with this?