Read WorkPoint types (separate Wire Pins from the rest)

Read WorkPoint types (separate Wire Pins from the rest)

Maxim-CADman77
Advisor Advisor
467 Views
4 Replies
Message 1 of 5

Read WorkPoint types (separate Wire Pins from the rest)

Maxim-CADman77
Advisor
Advisor

I need to determine which of the WorkingPoints in the given IPT are Wire Pins.

Till now I managed to print the list of WorkingPoints  (it even more entries than I can see in a browser, including the one wih an empty name placed the last)

Yet I can't determine a WP property defining points as Wire Pins (special object to be used while working inside of Cable&Harness Environment).

Could somebody direct me, please.

 

Thank in advance

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Accepted solutions (1)
468 Views
4 Replies
Replies (4)
Message 2 of 5

Maxim-CADman77
Advisor
Advisor

In empty (new) IPT there are already two WorkPoints

Origin and that noname (probably EoP-marker). I'm using this ILodic-code:

Dim doc As PartDocument = ThisDoc.Document

'[ List of Work Points
Dim ResMsgPnt As String
Dim Pnt_Count As Integer=doc.ComponentDefinition.WorkPoints.Count
Dim oPoint As WorkPoint
For Each  oPoint In doc.ComponentDefinition.WorkPoints
'Trace.WriteLine("iLogic: PointName - " & oPoint.Name)
ResMsgPnt=ResMsgPnt & oPoint.Name & "-" & oPoint.Type & vbCrLf
Next
MsgBox (ResMsgPnt,,"PointList (" & Pnt_Count &"):")
']

 I still need some help...

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Message 3 of 5

Maxim-CADman77
Advisor
Advisor

I've checked BIMConnectors but there is no entries here while model contains Couple of Pins. Any Ideas?

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Message 4 of 5

chandra.shekar.g
Autodesk Support
Autodesk Support

@Maxim-CADman77,

 

Unfortunately, Inventor API does not exposed API to identify wire pins. Please log this wish list at idea station using below link.

 

https://forums.autodesk.com/t5/inventor-ideas/idb-p/v1232/tab/most-recent

 

Thanks and regards,

 


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 5 of 5

Maxim-CADman77
Advisor
Advisor
Accepted solution

I believe i've found a faster (? indirect ?) solution.

iLogic code:

Dim oPartDoc As PartDocument=ThisDoc.Document
Dim oCompDef As ComponentDefinition=oPartDoc.ComponentDefinition
Dim oWP As WorkPoint
Dim oAttr As Attribute
Dim WpMsgBody As String
Dim WpIndx As Integer

' Check if 1st Attribute's Value in 1st AttributeSet is "ConnectorPin"
For WpIndex=2 To (oCompDef.WorkPoints.Count)-1
oWP=oCompDef.WorkPoints.Item(WpIndex)
Trace.WriteLine ("iLogicEcho" & oWP.Name)
Try
	oAttr=oWP.AttributeSets.Item(1).Item(1)
	If oAttr.Value="ConnectorPin" Then WpMsgBody=WpMsgBody & oWP.Name & vbCrLf
Catch
End Try
Next
MsgBox (WpMsgBody,,"Wire Pins are:")

Improvements are welcome.

Please vote for Inventor-Idea Text Search within Option Names

0 Likes