.NET

Reply
Contributor
13 Posts
0 Kudos
Registered: ‎08-10-2011
Post 1 of 1

Infopoint properties (Mechanical)

191 Views, 0 Replies
11-09-2012 03:13 AM

Hi

 

I need to get properties (Name, Material, Mass ets.) from Infopoint in Autocad Mechanical 2013. I found this code to get infopoint and its works, but how to get property's values?

 

Dim acApp As AcadApplication = DirectCast(System.Runtime.InteropServices.Marshal.GetActiveObject("Autocad.Application.18"), AcadApplication)
Dim ed As Editor = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor

        ed.WriteMessage("Select Infopoint:")
        Dim pso As New PromptSelectionOptions()
        pso.SinglePickInSpace = True
        Dim res As PromptSelectionResult = ed.GetSelection(pso)

        Dim SS As Autodesk.AutoCAD.EditorInput.SelectionSet = res.Value
        If SS Is Nothing Then
            Return
        End If
        If SS.Count < 1 Then
            Return
        End If

        If (SS(0)).ObjectId.ObjectClass.Name.Contains("AcmPartRef") Then
            ed.WriteMessage("Is an infopoint:")

            
        End If

 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!