Getting original part display name

Getting original part display name

Anonymous
Not applicable
902 Views
4 Replies
Message 1 of 5

Getting original part display name

Anonymous
Not applicable

Hi,

 

How can I get the original display name of a part (content center family name) from an occurrence in a assembly document.

 

 

Pascal

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

jdkriek
Advisor
Advisor

Here you go 😉

 

iLogic:

 

'ResetBrowser - J.Kriek 2012
oAssy = ThisDoc.Document
	For thisOcc = 1 To oAssy.ComponentDefinition.Occurrences.count
		oAssy.ComponentDefinition.Occurrences(thisOcc).Name = ""
	Next thisOcc

VBA:

 

Public Sub ResetBrowser()
'J.Kriek 2012
    Dim oAssy As AssemblyDocument
    Set oAssy = ThisApplication.ActiveDocument
    Dim thisOcc As Integer
        For thisOcc = 1 To oAssy.ComponentDefinition.Occurrences.count
            oAssy.ComponentDefinition.Occurrences(thisOcc).Name = ""
        Next thisOcc
End Sub
Jonathan D. Kriek
MFG Solutions Engineer
KETIV Technologies, Inc.


0 Likes
Message 3 of 5

Anonymous
Not applicable

Maybe my question was not clear...

 

I don't want the name of the occurrence, I wan't the name of the content center family that the occurrence comes.

 

 

I hope is now more clear Smiley Tongue

 

 

Pascal Langlais

.Net Developper

0 Likes
Message 4 of 5

xiaodong_liang
Autodesk Support
Autodesk Support
Accepted solution

The corresponding part documet stores the CC information in its Properties. Please refer to the attached snapshot.

0 Likes
Message 5 of 5

Anonymous
Not applicable

It's exactly what I need.

 

Thank you very much.

 

 

Pascal

0 Likes