Jump to content

Using an xref's scale factor for some calculations...


Comatosis

Recommended Posts

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?).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...