Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

length, width, and height of a assembly?

10 REPLIES 10
Reply
Message 1 of 11
Anonymous
2075 Views, 10 Replies

length, width, and height of a assembly?

Hi everyone!

I would like to determine the length, width, and height of a assembly.

Can i use the bounding box method to do this, or the range box?

Can anyone give a example?

Thansk.
10 REPLIES 10
Message 2 of 11
Anonymous
in reply to: Anonymous

AssemblyComponentDefinition.RangeBox should give you these extents. These
extents include things such as sketches and work features. If you don't want
those included, you'll need to iterate over all bodies in the leaf parts and
build your own range box.

Sanjay-

wrote in message news:5781503@discussion.autodesk.com...
Hi everyone!

I would like to determine the length, width, and height of a assembly.

Can i use the bounding box method to do this, or the range box?

Can anyone give a example?

Thansk.
Message 3 of 11
Anonymous
in reply to: Anonymous

eh?
Message 4 of 11
Anonymous
in reply to: Anonymous

need help ...
Message 5 of 11
Anonymous
in reply to: Anonymous

Recently I needed the same thing, here the snippet code:

Sub GetBoundingBox()

    Dim ass As AssemblyDocument
    Set ass = ThisApplication.ActiveDocument
    
    Dim min_point(1 To 3) As Double
    Dim max_point(1 To 3) As Double
    
    Call ass.ComponentDefinition.RangeBox.GetBoxData(min_point, max_point)
    
    Debug.Print min_point(1) & " " & min_point(2) & " " & min_point(3)
    Debug.Print max_point(1) & " " & max_point(2) & " " & max_point(3)

End Sub

maybe is useful for someone else. Bye

P

Message 6 of 11
bradeneuropeArthur
in reply to: Anonymous

Hi,
Is this solved now?
Or do you need further assistance?
Regards,

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
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: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 !

Message 7 of 11
Anonymous
in reply to: bradeneuropeArthur

It's solved on my snippet. There are otherways?

Message 8 of 11
bradeneuropeArthur
in reply to: Anonymous

Hi,

 

I can provide you My/the coding if needed.

 

Regards,

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
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: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 !

Message 9 of 11

Hi,

 

This may be an interesting idea:

 

https://forums.autodesk.com/t5/inventor-ideas/dimension-component-part-and-assembly/idi-p/7523011

 

Regards,

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
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: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 !

Tags (1)
Message 10 of 11
felipeecheverri
in reply to: Anonymous

hi, use this ilogic

 

	MaxL = Round (Measure.ExtentsLength,0)
	MaxW = Round (Measure.ExtentsWidth,0)
	MaxH = Round (Measure.ExtentsHeight,0)

 

Message 11 of 11

it works, thanks

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report