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

Exporting Only one element to ACIS File.

1 REPLY 1
Reply
Message 1 of 2
Vignesh_CPT
309 Views, 1 Reply

Exporting Only one element to ACIS File.

Hi,
Could anyone please tell me how to achieve Isolating a single element and Export the element alone as SAT File?

Regards,
Vignesh. S
1 REPLY 1
Message 2 of 2
sszabo
in reply to: Vignesh_CPT

Posted a solution here:

 

http://forums.autodesk.com/t5/NET/Using-AcadSelectionSet-to-export-selected-3dSolid-to-ACIS-SAT/td-p...

 

 

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
    Public Function ExportDWG2SAT(ByVal lsFullName As String) As Object
        Dim ssetObj As AcadSelectionSet
        Dim removeObjects As New List(Of AcadEntity)
        Dim sImage_Type = "SAT"
        ssetObj = m_currentDoc.SelectionSets.Add("SSALL")   ' creates named selection set
        ssetObj.Select(AcSelect.acSelectionSetAll) 'select everything in the drawing
        Dim my3DSolidObj As Object = GetVisible3dSolid()
        If Not IsNothing(my3DSolidObj) Then
            Dim my3DSolid As ObjectId = CType(my3DSolidObj, ObjectId)
            For Each ent As AcadEntity In ssetObj
                Select Case ent.ObjectName
                    Case "AcDb3dSolid"
                            If ent.ObjectID <> CType(my3DSolid.OldIdPtr, Long) Then
                                removeObjects.Add(ent)
                            End If
                    Case Else
                        removeObjects.Add(ent)
                End Select
            Next
            Dim removeArr() As AcadEntity = removeObjects.ToArray
            ssetObj.RemoveItems(removeArr)
            m_currentDoc.Export(lsFullName, sImage_Type, ssetObj)
        End If
        Return Nothing
    End Function

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