In the same drawing, an assembly with its associated nomenclature and the drawings of the parts of the assembly in question appears. I would like to annotate these drawings with the part coordinate system and the amount used in the assembly, but I can't find the parameters to associate.
Using the "BOM Part Number" parameter, it shows me the name of the configuration...
Attached, a screenshot of what I would like to have.
After having made the MEP of the assembly with its nomenclature you create a new sheet where you insert a part of your ASS.
Then either you attach an annotation to this part by retrieving the custom property of it, then you put yourself on "Component to which the annotation is attached" and then you choose the desired property: part number, mass, material etc...
Or better, you load the properties of your part directly into the cartridge by right-clicking on the sheet and then editing the basemap. Then, in the bottom drop-down menu, you have to choose a view of this sheet. And your cartridge is filled with the properties of the part inserted into this sheet.
I just tested my solution more thoroughly and it works very well:)
Here are the steps:
- Add annotation
- Insert custom text (e.g., marker:)
- Click on the icon in PC.
- Click on the box to link in the nomenclature
FYI, I moved the components in the BOM, duplicated the components in the added assembly, and removed other components to see if it ended up losing the links and it didn't.
Part quantities and coordinate systems update correctly in the annotation
Interesting, thank you. But it looks for the identifier of a row, not the identifier of the table.
I recorded a macro of what I wanted to achieve using the "bind value to a cell" function to know which functions to use in VBA. It looks like this:
' C:\Users\fmaisonneuve\AppData\Local\Temp\swx9184\Macro1.swb - macro recorded on 12/21/17 by FMAISONNEUVE
' ******************************************************************************
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
boolstatus = Part.ActivateView("Vue de mise en plan8")
Dim myNote As Object
Dim myAnnotation As Object
Dim myTextFormat As Object
Set myNote = Part.InsertNote("Repère : <TABLEOBJECT ID=""1189"" RECORD ID=""8"" COLUMN ID=""2"" COMPNAME=""Chassis-6@Nomenclature2/Tole_Essai4-1@Chassis"" COLNAME=""Rep."" WELDMENTORDNUM=""-1"">" + Chr(13) + Chr(10) + _
"Qté : <TABLEOBJECT ID=""1189"" RECORD ID=""8"" COLUMN ID=""4"" COMPNAME=""Chassis-6@Nomenclature2/Tole_Essai4-1@Chassis"" COLNAME=""<FONT style=B>Nbre"" WELDMENTORDNUM=""-1"">" + Chr(13) + Chr(10) + _
"Epaisseur : $PRPVIEW:""Epaisseur"" mm" + Chr(13) + Chr(10) + _
"Matière : $PRPVIEW:""Matiere""" + Chr(13) + Chr(10) + _
"Protection : $PRPVIEW:""Protection""")
If Not myNote Is Nothing Then
myNote.LockPosition = False
myNote.Angle = 0
boolstatus = myNote.SetBalloon(0, 0)
Set myAnnotation = myNote.GetAnnotation()
If Not myAnnotation Is Nothing Then
longstatus = myAnnotation.SetLeader3(swLeaderStyle_e.swNO_LEADER, 0, True, False, False, False)
boolstatus = myAnnotation.SetPosition(0.400401767151841, 0.446719946500758, 0)
boolstatus = myAnnotation.SetTextFormat(0, True, myTextFormat)
End If
End If
Part.ClearSelection2 True
Part.WindowRedraw
boolstatus = Part.ActivateSheet("Feuille1")
boolstatus = Part.ActivateView("Vue de mise en plan8")
End Sub
To automate, I need to retrieve the value associated with "TABLEOBJECT ID" from the previously created nomenclature.
In fact in your nomenclature you can put a line designation and part number. This information should be linked to the custom properties of each coin.
Thus, by pointing an annotation on a part of your drawing, even after having made a drawing of your assembly, you will be able to retrieve the information applied before.