Hi there.
I have made a script wherein I aim to dimension an element to it’s nearest wall face, specifically in a reflected ceiling plan view. These walls are linked into the model, which makes it trickier.
I am yet to finish the script, as I was focusing on getting just one dimension to place, so far I’ve had no joy.
I’d like to point out that I am focusing on MEP fittings here, and I’d like to be able to instantly add dimensions to several fittings at a time from their centre reference to the nearest wall face both vertically and horizontally.
The script produces no errors, but doesn’t place a dimension either and I’m not sure where I’m going wrong. Any support is greatly appreciated.
Just to add to this, as you can see the script is finding the correct wall references but not adding a dimension.
Today I’ve kind of backtracked on this project and approached it from a new angle.
I’m still really struggling with the logic of finding a reference for the nearest wall face and dimensioning from the centre of an element to that wall face, but today I have successfully made a script that dimensions from the centre points of each fitting in the ceiling, along with the logic to remove dimensions from elements that are already aligned.
It comes out looking like this. As my offset depends on the room, it isn’t necessary to add one. Instead I can just drag the dimension to where I’d like it.
From there, I simply edit the witness line and add the closest wall face to the chain of dimensions. This is the part that I’m struggling with the logic of. Any suggestions are appreciated!