Component Measure

Component Measure

atomic.lex
Enthusiast Enthusiast
461 Views
4 Replies
Message 1 of 5

Component Measure

atomic.lex
Enthusiast
Enthusiast

Hey,

I'm trying to collect measures of components, but don't know how could it work. 

 

I could ask it in a component

H = Measure.ExtentsHeight

 But couldn't do it for all of components in assembly

 

Dim oDoc As AssemblyDocument = ThisDoc.Document
Dim oComps As ComponentOccurrences = oDoc.ComponentDefinition.Occurrences
Dim oComp As ComponentOccurrence

For Each oComp In oComps
H = oComp.Measure.ExtentsHeight
Next

 Any ideas?

 

Thx, Alex

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

bradeneuropeArthur
Mentor
Mentor

Take  a look at the shortcut in my footer.

is this what you mean?

"Dimension Component!"

Regards,

Autodesk Software: Inventor Professional 2018 | Vault Professional 2018 | Autocad Mechanical 2018
Programming Skills: Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Dimension Component! | Partlist Export! | Derive I-properties! | Vault Prompts Via API! | Vault Handbook/Manual!
Drawing Toggle Sheets! | Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 5

atomic.lex
Enthusiast
Enthusiast
Accepted solution

Thanks for replay,

 

as i see, with a little trik  it's not possible. Thats why i wrote a little script, which shows one time only one component and asks assembly measure. Not a simple but usefull way.

 

Wish you a good day,

Alex

0 Likes
Message 4 of 5

bradeneuropeArthur
Mentor
Mentor

Hi,

 

I don't understand what you mean.

Please explain further...

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 5 of 5

atomic.lex
Enthusiast
Enthusiast

It looks like:

Dim oDoc As AssemblyDocument = ThisDoc.Document
Dim oComps As ComponentOccurrences = oDoc.ComponentDefinition.Occurrences
Dim oComp As ComponentOccurrence
Dim Hights As New ArrayList()
For Each oComp In oComps
If Component.IsActive(oComp.Name) = True Then 
Component.Visible(oComp.Name) = True 
Else 
Component.Visible(oComp.Name) = False
End If
Component.IsActive(oComp.Name) = False
Next
For Each oComp In oComps
Component.IsActive(oComp.Name) = True
H = Round(Measure.ExtentsHeight)
If H > 0 Then Hights.Add(H)
Component.IsActive(oComp.Name) = False
Next
MultiValue.List("Hight") = Hights
For Each oComp In oComps
If Component.Visible(oComp.Name) = True Then 
Component.IsActive(oComp.Name) = True
Else 
Component.IsActive(oComp.Name) = False
End If
Next

 

0 Likes