Is there any way to determine whether a SketchPoint is a SketchPoint that was placed with the point command vs. a SketchPoint that is part of other geometry like a SketchLine? From what I'm seeing in the object browser they look identical. If I were to place a point at the end point of the SketchLine and there is also a EndPointSketchPoint at the same position. How do you know the difference? The difference between the SketchPoint placed with the point command and the "EndSketchPoint" that is part of the SketchLine geometry?
I did notice some odd behavior. If you do place a point using the point command on a end point or start point of a sketchline, when you highlight over the opposite end and the flyout letting you choose a different object there is only one SketchPoint and one sketchline choice. Almost like since the Point was placed on the end point or start point it no longer exists.
There is a point on the opposite end of the SketchLine at the other end point.
Tiffany Hayden
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
Gelöst von J-Camper. Gehe zur Lösung
@Tiffany_Hayden_,
I think you can use the OwnedBy Property. It seems to contain the sketchline for a point if that point is a Start/End point defining it. Look at this:
Dim selectThisPoint As HighlightSet = ThisApplication.ActiveDocument.CreateHighlightSet
Dim Red As Byte = 255 : Dim Green As Byte = 100 : Dim Blue As Byte = 100
selectThisPoint.Color = ThisApplication.TransientObjects.CreateColor(Red, Green, Blue)
Dim selectTheseOwners As HighlightSet = ThisApplication.ActiveDocument.CreateHighlightSet
selectTheseOwners.Color = ThisApplication.TransientObjects.CreateColor(Green, Blue, Red)
For Each skp As SketchPoint In ThisDoc.Document.ActivatedObject.SketchPoints
selectThisPoint.AddItem(skp)
If skp.OwnedBy.Count <1 Then
MessageBox.Show("This Point Is Not Owned by anthing")
selectThisPoint.Clear
Continue For
End If
selectTheseOwners.AddMultipleItems(ThisApplication.TransientObjects.CreateObjectCollection(skp.OwnedBy))
MessageBox.Show("This Point Is Owned these things")
selectThisPoint.Clear
selectTheseOwners.Clear
Nextno check in there to make sure you are editing a sketch since this is just for testing.
Worked like a charm! Thanks so much!
Tiffany Hayden
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.
This is going to be nice when we upgrade to the version that has the mid point. Hopefully they keep the same logic.
2025.2
Tiffany Hayden
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.
Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.