- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
How to Show Context Menus?
I need to right Click with code once i have the object selected from the browser in a drawing.
But i cant find the command to do this, Only how to add buttons but not to actually bring that menu up.
Any help would mean a lot.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Ok I have Workaround in my case.
I knew that the curves I was tackling were all proxies and also I knew the object from which they came from.
So I just found them through Drawing curves...
Dim oCurve As DrawingCurve Dim oColor As Color For Each oCurve In oView.DrawingCurves If oCurve.ModelGeometry.Type = 83898992 Or oCurve.ModelGeometry.Type = 83896176 Then 'MessageBox.Show(oCurve.ModelGeometry.ContainingOccurrence.Definition.Document.DisplayName) String_1 = oCurve.ModelGeometry.ContainingOccurrence.Definition.Document.DisplayName If InStr(String_1,"SIA") > 0 Then oColor = ThisApplication.TransientObjects.CreateColor(0, 255, 0) oCurve.Color = oColor oCurve.LineType = LineTypeEnum.kContinuousLineType oCurve.LineWeight = 2 ElseIf InStr(String_1,"GIA") > 0 Then oColor = ThisApplication.TransientObjects.CreateColor(255, 0, 0) oCurve.Color = oColor oCurve.LineType = LineTypeEnum.kContinuousLineType oCurve.LineWeight = 2 End If End If Next
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
So...do you still need help?
If you need to make a manual (by mouse click) selection to go with your iLogic code, there are a couple popular options.
You can use oDoc.SelectSet
at the beginning of your code.
That captures your existing selection, from before you started the code, into an ObjectCollection.
You can also use the following line, but just change the selection filter and object type to suit your needs:
Dim oObj As Object = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAllEntities,"Select an Entity")
Wesley Crihfield
(Not an Autodesk Employee)