Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
WCrihfield
in reply to: shiftctrl.io

Is the end goal just to create the planes, or do you want to get the size of the available interior space?

Here's a quickie rule that  should get the interior size, using the model's RangeBox, then subtracting wall thicknesses.

It's not the most intuitive, but should work if the model is oriented the same way each time.

'This assumes the model is a multi-body part file, and not an assembly.
Dim oPDoc As PartDocument = ThisApplication.ActiveDocument
Dim oPDef As PartComponentDefinition = oPDoc.ComponentDefinition
'Asuming X-Axis is along width, Y-Axis is along Depth, and Z-Axis is along Height
Dim oBox As Box = oPDef.RangeBox
Dim oMinCoords(), oMaxCoords() As Double
oBox.MinPoint.GetPointData(oMinCoords)
oBox.MinPoint.GetPointData(oMaxCoords)
Dim oWidth As Double = (oMaxCoords(0) -oMinCoords(0))
Dim oDepth As Double = (oMaxCoords(1) -oMinCoords(1))
Dim oHeight As Double = (oMaxCoords(2) -oMinCoords(2))

'These values can either be manual entry, InputBox, captured from the models or Parameters.
'If the model components/bodies had names specific to their positions (top,right,etc.)
'you could extract the thickness parameter from them to use here.
Dim oRRWall As Double = .375
Dim oSWall As Double = .5
Dim oTWall As Double = .5
Dim oBWall As Double = .75

oWidth = oWidth - (oSWall * 2)
oDepth = oDepth - oRRWall
oHeight = oHeight - (oBWall + oTWall)
MsgBox("The available interior space is:" & vbCrLf & _
oWidth.ToString & " Wide x " & oDepth.ToString & " Deep x " & oHeight.ToString & " Tall.")

Wesley Crihfield

EESignature

(Not an Autodesk Employee)