.NET

Reply
Valued Contributor
Vignesh_CPT
Posts: 62
Registered: ‎01-17-2008
Message 1 of 2 (119 Views)

Exporting Only one element to ACIS File.

119 Views, 1 Replies
03-14-2008 01:55 AM
Hi,
Could anyone please tell me how to achieve Isolating a single element and Export the element alone as SAT File?

Regards,
Vignesh. S
Valued Contributor
sszabo
Posts: 86
Registered: ‎09-05-2012
Message 2 of 2 (69 Views)

Re: Exporting Only one element to ACIS File.

11-22-2012 09:08 AM 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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community