SketchPoint vs. EndSketchPoint or StartSketchPoint on a SketchLine

SketchPoint vs. EndSketchPoint or StartSketchPoint on a SketchLine

Tiffany_Hayden_
Collaborator Collaborator
367 Views
3 Replies
Message 1 of 4

SketchPoint vs. EndSketchPoint or StartSketchPoint on a SketchLine

Tiffany_Hayden_
Collaborator
Collaborator

 

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? 

 

Tiffany_Hayden__0-1734105093029.png

 

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__1-1734105986836.png

 

 

 

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.

EESignature

0 Likes
Accepted solutions (1)
368 Views
3 Replies
Replies (3)
Message 2 of 4

J-Camper
Advisor
Advisor
Accepted solution

@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
Next

no check in there to make sure you are editing a sketch since this is just for testing.

Message 3 of 4

Tiffany_Hayden_
Collaborator
Collaborator

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.

EESignature

0 Likes
Message 4 of 4

Tiffany_Hayden_
Collaborator
Collaborator

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.

EESignature

0 Likes