- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello together,
I would like to let a user select the LevelOfDetailRepresentation in the browser. How could I do this?
Thanks
Georg
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
In what way would you like the user to make the selection? Is the selection part of a dialog and you want to get and present a list of choices?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello Rodney,
I have some custom LevelOfDetailRepresentations. In the program I would like to get one of the custom LOFs which the user choose from the browser.
Thats the program, which I tried to convert to VB.Net
Georg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
So you would like the user to use the browser to select the LevelOfDetail they want to select which may or may not be the current levelofdetail?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Attached is code that will get the return the current user selected Level of Detail. The GetSelectedLevelOfDetail function is the only portion needed. The main sub is just to test the function.
Snippet
'Sample of how to call function
Sub Main() Dim lod As LevelOfDetailRepresentation = Nothing lod = GetSelectedLevelOfDetail(True) If Not lod Is Nothing Then MessageBox.Show(lod.Name) End Sub 'Get Current Selected LevelofDetail, set customOnly to True to only return custom LODs Function GetSelectedLevelOfDetail(customOnly As Boolean) As LevelOfDetailRepresentation 'Get the Document Selection Set Dim ss As SelectSet = ThisDoc.Document.SelectSet Dim selectedLOD As LevelOfDetailRepresentation = Nothing 'Check that only one item is selected If ss.Count = 1 Then 'Check to see if it's a level of detail item If ss(1).Type = ObjectTypeEnum.kLevelOfDetailRepresentationObject Then Dim lod As LevelOfDetailRepresentation = ss(1) If customOnly Then 'Set only if its a custom level detail If (lod.LevelOfDetail = LevelOfDetailEnum.kCustomLevelOfDetail) Then selectedLOD = lod Else 'Set if any kind will do selectedLOD = lod End If End If End If Return selectedLOD End Function