- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Melden
Hallo,
hat jemand zufällig einen VBA Code zur Hand mit dem ich Skizzenpunkte zum Beispiel aus einem SelectionSet zum leuchten bringen kann (Highlight). In der API Hilfe finde ich leider nur ein Beispiel wie es mit Faces geht. Ein Punkt hat aber keine Faces.
Google gibt auch nichts her ![]()
Code für Faces aus der API Hilfe:
Sub Main()
' Check to make sure the active document is a part.
If ThisApplication.ActiveDocumentType kPartDocumentObject Then
MsgBox "A part document must be open."
End
End If
' Set a reference to the active part document.
Dim oDoc As PartDocument
Set oDoc = ThisApplication.ActiveDocument
' Arbitrarily get two faces. (Assumes a model exists that has
' at least 3 faces.
Dim oFace1 As Face
Dim oFace2 As Face
Set oFace1 = oDoc.ComponentDefinitions(1).SurfaceBodies(1).Faces(1)
Set oFace2 = oDoc.ComponentDefinitions(1).SurfaceBodies(1).Faces(3)
' Create a highlight set.
Dim oSet1 As HighlightSet
Set oSet1 = oDoc.CreateHighlightSet
' Add the first face to the highlight set.
Call oSet1.AddItem(oFace1)
' Create another highlight set.
Dim oSet2 As HighlightSet
Set oSet2 = oDoc.CreateHighlightSet
' Change the color of the highlight set to green.
oSet2.Color = ThisApplication.TransientObjects.CreateColor(0, 255, 0)
' Add the second face to the highlight set.
Call oSet2.AddItem(oFace2)
End Sub
Weiter heisst es in der API Hilfe:
HighlightSet.AddItem MethodHighlightSet.AddItem( Entity As Object )
| Entity | Input Autodesk Inventor object that is valid to be highlighted. |
Was muss ich da als object angeben beim Punkt?
Grüße Martin
@Martin-Winkler-Consulting,
Die Themenüberschrift wurde zur besseren Auffindbarkeit editiert von marius.gildehaus
Original: Skizzenpunkt(e) zum leuchten bringen (Sketchpoint Highlight) mit VBA
Martin Winkler
CAD Developer
Did you find this post helpful? Feel free to like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Gelöst! Gehe zur Lösung