Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

SketchPoint vs. EndSketchPoint or StartSketchPoint on a SketchLine

3 ANTWORTEN 3
GELÖST
Antworten
Nachricht 1 von 4
Tiffany_Hayden_
122 Aufrufe, 3 Antworten

SketchPoint vs. EndSketchPoint or StartSketchPoint on a SketchLine

 

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

3 ANTWORTEN 3
Nachricht 2 von 4
J-Camper
als Antwort auf: Tiffany_Hayden_

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

Nachricht 3 von 4
Tiffany_Hayden_
als Antwort auf: Tiffany_Hayden_

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

Nachricht 4 von 4
Tiffany_Hayden_
als Antwort auf: Tiffany_Hayden_

This is going to be nice when we upgrade to the version that has the mid point. Hopefully they keep the same logic. :leicht_lächelndes_Gesicht: 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

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report