Hello all,
I've received a AutoCAD2007 drawing with a mix of objects drawn on the plain with Z=zero, and objects that were drawn while inadvertently a UCS was set with Z not equal to zero. I've run superflatten.lsp to resolve this, but I've found that it leaves most extention defining points of many dimensions outside the Z=0 plain. Some testing revealed that superflatten.lsp moves dimension to the Z=0 plain correctly when the entire dimension (extention defining points as well as dimension line defining point) where drawn in the same Z plane originally.
On the other hand, when the dimension has been drawn in such a way that the extension defining points and the dimension line defining point are on different Z plains originally, running superflatten results in that only the dimension line and extension lines are moved to the Z=0 plain, but the extension defining points just move over the same relative distance and are left floating above or under the Z=0 plain, with a Z-distance they originally had relative to the dimension line defining point.
I've attached an example of a dimension of which the extension defining points are not moved to Z=zero when while running superflatten.
I've examined superflatten. lsp and found that dimensions are processed by routine FlatDimension. Reading this section, I would expect that FlatDimension attempts to "flatten" each individual sub-object of a dimension separately, and I think that extension defining points are processed by the calls to either the `ExtLine1Point object or 'ExtLine1StartPoint object (and the matching "2" object respectively).
Based on my testing, I believe that the defect seems to be caused by (vlax-property-available-p obj 'ExtLine1Point) resulting in nil
Would it be possible for me to rewrite superflatten.lsp in such a way that extension defining points are always moved to Z=zero ? I would appreciate a nudge in the direction I would have to take in order to search a solution.
With friendly greetings, M. Moolhuysen.