Using an xref's scale fac
Hello,I have a really simple routine that consists of picking two points on the screen and spitting out the distance between them (not really dimensioning, hence why I made a separate routine for it). Anyway, I got it to work by just having the user pick the two points and then acknowledging that the drawing scale is correct (if not, they can enter the correct scale), but then I thought I could remove this step altogether with a couple of more lines, which proved tougher than I thought.
All our floor plans are xrefs, so I decided to get the scale multiplier from the xref's scale factor. Since a lot of our drawings have more than one xref at different scales, though, I was using each xref's xclip frame information as a way to determine the location of the points I picked, and then grabbing the scale factor of the xref that corresponds to the xclip frame that contains the points. (whew)
Is there a more generalized way to do this? While this works in most cases, I had a couple of bugs here and there that I needed to figure out, but more importantly, the distances we're interested in may often be located outside the xclip frame, meaning I have to un-xclip the xref first, which means I wouldn't have that information available to me.
Any suggestions? Thanks a bunch.
(p.s. I wouldn't be opposed to approaching this problem in an entirely different way either, if anyone thinks my way just sucks. Something like an internal crossing selection of all objects near my point and filtering the selection to anything that is an xref?).
页:
[1]