How to select orange dimension by MACRO
I attached assembly file
The general logic is:
[Sub assembly]-[instance] / [Sub Sub assemply]-[instance] / ... / [Part]-[instance]
Like a web url structure.
But if you want to get it via macro, you could use the "Name2" method.
See this example:
2018 SOLIDWORKS API Help - Get Selected Objects and Types Example (VBA)
Shinma Hiroyuki, I've changed the notes folder in Part5 to "Notes001" (just for western keyboard purposes)
Then changed you code to:
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
boolstatus = Part.Extension.SelectByID2("RD2@Notes001@Asm2-1/Asm3-1/Part5-1", "DIMENSION", 0, 0, 0, False, 0, Nothing, 0)
See if it helps
Thankyou Madson Germano
It's works. You how to get Notes001@Asm2-1/Asm3-1/Part5-1 this data.
Thanks you so much Madson Germano
Retrieving data ...