Determine if document contains 3D elements

Determine if document contains 3D elements

Anonymous
Not applicable
589 Views
1 Reply
Message 1 of 2

Determine if document contains 3D elements

Anonymous
Not applicable

Is there an API method or property that I can use to determine if an AutoCAD document has 3D elements?  I tried looking for a flag when the message 'Loading Modeler DLLs' is shown as that seems to be a fairly reliable indicator, but found nothing.  I'd prefer not to traverse the database elements, if possible.

 

Using:

AutoCAD 2011

Visual Studio 2008 SP1

Project is in VB.NET Using .NET 3.5

 

Thanks!

0 Likes
Accepted solutions (1)
590 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Accepted solution

Due to the deafening sound of crickets I've heard from this post, I'd thought I'd supply the solution I came up with.  This may not be the best way, but it seems to work reliably.

 

Dim oARX_Objects As Object
            Dim sARX_Objects() As String
            Dim bDocIs3D As Boolean = False
            'Get all loaded modules. Returns a single object that hides an array of strings
            oARX_Objects = AcadMan.ListArx()
            'Convert the object into a usable  string array
            sARX_Objects = CType(oARX_Objects, String())

            'Search for key DLL's that indicate a 3D document.
            For Each sARX_Name As String In sARX_Objects
                If sARX_Name.ToLower = "aecmodeler60.dbx" Then
                    bDocIs3D = True
                    Exit For
                End If
                If sARX_Name.ToLower = "aecsolidmodeler.dbx" Then
                    bDocIs3D = True
                    Exit For
                End If
                If sARX_Name.ToLower = "acsceneoe.dbx" Then
                    bDocIs3D = True
                    Exit For
                End If
            Next

 

0 Likes