Geting RangeBOX for local UCS.

Geting RangeBOX for local UCS.

edwin.grzybowskiEK8T3
Explorer Explorer
655 Views
4 Replies
Message 1 of 5

Geting RangeBOX for local UCS.

edwin.grzybowskiEK8T3
Explorer
Explorer

Hi everyone,

 

I have a macro that gets RangeBOX in global coordination system. See macro below.

 

Dim dMinX As Double

                             dMinX = oSurfBody.RangeBOX.MinPoint.X

                             Dim dMaxX As Double

                             dMaxX = oSurfBody.RangeBOX.MaxPoint.X

                             Dim RangeX As Double

                             RangeX = dMaxX - dMinX

 

 

I would like to have the same but for local UCS created in part file. The question is how to redefine  dMinX to get dMinX_UCS1?

 

 

Thanks in advance,
Edwin

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

chandra.shekar.g
Autodesk Support
Autodesk Support

@edwin.grzybowskiEK8T3,

 

Hoping that below image would help to predict dMinx_UCS1. Here, dMinx_UCS is calculated as dMinx_UCS = dMinx - UCSx.

 

Interpolation.png

 

Please feel free to contact if there is any queries.

 

If solves problem, click on "Accept as solution" / give a "Like".

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 3 of 5

edwin.grzybowskiEK8T3
Explorer
Explorer
 
 

 

Thank you for answer .  Your solution is fine in case where X and Y axis are parallel. Problem starts when they aren't.

 

I was thinking about it and get to conclusion that only way to solve that problem for all cases (any location in 3d space, any rotation of UCS axis in reference to WCS) is a transformation of UCS. Making UCS aliened with WCS ergo dMinX=DMin_UCS.

0 Likes
Message 4 of 5

chandra.shekar.g
Autodesk Support
Autodesk Support
Accepted solution

@edwin.grzybowskiEK8T3,

 

Currently, Inventor API does not support to calculate range box with respect to UCS. Please log this wish list at idea station using below link.

 

https://forums.autodesk.com/t5/inventor-ideas/idb-p/v1232/tab/most-recent

 

Thanks and regards,

 

 


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 5 of 5

bradeneuropeArthur
Mentor
Mentor

Hi @edwin.grzybowskiEK8T3,

 

Maybe you should vote this idea:

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

 

Regards,

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