How to differentiate between Cable and Harness Assemblies/Parts

How to differentiate between Cable and Harness Assemblies/Parts

pts.user2
Contributor Contributor
444 Views
1 Reply
Message 1 of 2

How to differentiate between Cable and Harness Assemblies/Parts

pts.user2
Contributor
Contributor

I am currently traversing a model that contains Cable and Harness components. I would like to differentiate whether an assembly or part is of the Cable and Harness type. Can anyone assist me with this?

Please refer attached image for your reference.Cable and harness in model browser.png

0 Likes
445 Views
1 Reply
Reply (1)
Message 2 of 2

Michael.Navara
Advisor
Advisor

Hi @pts.user2 

For this purpose you can use DocumentInterests. Variable cableAndHarnessId contains ClientId of Cable and Harness addin.

Dim asm As AssemblyDocument = ThisDoc.Document
Dim cableAndHarnessId As String = "{C6107C9D-C53F-4323-8768-F65F857F9F5A}"
For Each refDoc As Document In asm.AllReferencedDocuments
	If refDoc.DocumentInterests.HasInterest(cableAndHarnessId) Then
		'This is cable and harness document
		Logger.Debug(refDoc.DisplayName)
	End If
Next

 

0 Likes