Unit confusion when copying Blocks

Use this forum to ask questions about how to do things in QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

HappyShat
Active Member
Posts: 37
Joined: Thu Jul 25, 2019 9:43 pm

Unit confusion when copying Blocks

Post by HappyShat » Sun Oct 16, 2022 7:03 pm

I’ve got this weird issue/problem with QCAD.
  • I’m attempting to copy a block from Drawing A to Drawing B
  • Drawing A and Drawing B are have units mm
  • The units are wrong when the block has been copied to Drawing B.
  • Instead of 5.08mm I get 0.2mm. It just so happens that 5.08mm = 0.2 inches.
  • Now, if I first explode the block in Drawing A - and the copy to Drawing B - there is no issue with units/scaling
I’d prefer to keep the blocks and/or avoid having to recreate blocks.

What am I doing wrong? What should I check?

I’m using:
2015 MacBook pro running macOS Monterey
QCAD Professional version 3.24.3.0 (3.24.3)

CVH
Premier Member
Posts: 3416
Joined: Wed Sep 27, 2017 4:17 pm

Re: Unit confusion when copying Blocks

Post by CVH » Sun Oct 16, 2022 7:25 pm

HappyShat wrote:
Sun Oct 16, 2022 7:03 pm
What am I doing wrong? What should I check?
You are copying/pasting a Block Reference, right?
Are you sure that you are pasting in scale 1? ... Most likely.
Has the Block Reference a scale itself? Is that copied over correctly?

Many things have been fixed in between, I can not replicate this in 3.27.6 :wink:
Nor can I locate that issue in the QCAD Changelog.

Regards,
CVH

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4935
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Unit confusion when copying Blocks

Post by Husky » Sun Oct 16, 2022 7:29 pm

Hi,

out of the blue I would assume there are already blocks in drawing B with the same names like the blocks imported from drawing A and the insert option is not set to overwrite blocks. At the blocks in drawing B is a scale used somehow related to factor 25.4 (inch).

However - to provide an efficient support we need to see the drawings or at least example drawings which are showing the same issue. Is it possible for you to attache them to your topic? Thanks.

BTW: Is the inserting scale 1?
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

HappyShat
Active Member
Posts: 37
Joined: Thu Jul 25, 2019 9:43 pm

Re: Unit confusion when copying Blocks

Post by HappyShat » Sun Oct 16, 2022 7:54 pm

I'm using the RC command to copy the block from Drawing A and then command-v (similar to control-v in windows) to paste the block into Drawing B. I'm not seeing a scale option with this method. I am not overwriting blocks in Drawing B. I'm not sure how to check the scale of existing blocks in Drawing B.

Here's a very odd thing - and it would be a lot easier to create a video to show/describe this. As I paste the bock into Drawing B (but just before placing the block in a specific location in drawing B) I can see a square/rectangle that is very likely the exact correct scale for the part. However, the moment I place the part the units are wrong.

CVH
Premier Member
Posts: 3416
Joined: Wed Sep 27, 2017 4:17 pm

Re: Unit confusion when copying Blocks

Post by CVH » Sun Oct 16, 2022 8:04 pm

HappyShat wrote:
Sun Oct 16, 2022 7:54 pm
I can see a square/rectangle that is very likely the exact correct scale for the part.
The boundary of the paste action indeed is defined by a bounding box scaled by RS.Units e_geek
That would mean that this isn't scaled on the fly.
HappyShat wrote:
Sun Oct 16, 2022 7:54 pm
I'm using the RC command to copy the block from Drawing A and then command-v (similar to control-v in windows) to paste the block into Drawing B. I'm not seeing a scale option with this method
That would be the Option Toolbar and yes, when you get the preview and the larger crosshair that would present a Scale option among others.

Regards,
CVH

CVH
Premier Member
Posts: 3416
Joined: Wed Sep 27, 2017 4:17 pm

Re: Unit confusion when copying Blocks

Post by CVH » Sun Oct 16, 2022 8:07 pm

HappyShat wrote:
Sun Oct 16, 2022 7:54 pm
I'm not sure how to check the scale of existing blocks in Drawing B.
A Block Reference has a Scale Property in X & Y ... Z
Editing the block in drawing B should match with that from A.

Regards,
CVH

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4935
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Unit confusion when copying Blocks

Post by Husky » Sun Oct 16, 2022 8:18 pm

HappyShat wrote:
Sun Oct 16, 2022 7:54 pm
I'm using the RC command to copy the block from Drawing A and then command-v (similar to control-v in windows) to paste the block into Drawing B. I'm not seeing a scale option with this method.
Inserting a clipboard content triggers an option bar to pop up on the top of Model_Space even if a Windows command is used like CTRL V. That is where you can find all needed information ...

Husky-2022.10.16-01.png
Husky-2022.10.16-01.png (22.38 KiB) Viewed 4272 times
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

HappyShat
Active Member
Posts: 37
Joined: Thu Jul 25, 2019 9:43 pm

Re: Unit confusion when copying Blocks

Post by HappyShat » Sun Oct 16, 2022 8:33 pm

Scale is 1

HappyShat
Active Member
Posts: 37
Joined: Thu Jul 25, 2019 9:43 pm

Re: Unit confusion when copying Blocks

Post by HappyShat » Sun Oct 16, 2022 8:40 pm

I've attached Drawing A and Drawing B. The block I was discussing (trying to copy) is MCX from Drawing A.
Attachments
Drawing_B.dwg
(118.08 KiB) Downloaded 218 times
Drawing_A.dwg
(33.92 KiB) Downloaded 222 times

HappyShat
Active Member
Posts: 37
Joined: Thu Jul 25, 2019 9:43 pm

Re: Unit confusion when copying Blocks

Post by HappyShat » Sun Oct 16, 2022 9:07 pm

I'm still not connecting the dots on what exactly is wrong - but, for now, I just scaled everything in Drawing B by 1/25.4. Now I can copy from drawing to drawing without a problem involving scale/units.

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4935
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Unit confusion when copying Blocks

Post by Husky » Sun Oct 16, 2022 9:13 pm

Block MCX in drawing A is not the same size like the MCX block in drawing B. During the clipboard insert process you decide with "Overwrite Blocks" which block has to be used. The one from A or the one from B ...

That is why my first answer was ...
Husky wrote:
Sun Oct 16, 2022 7:29 pm
out of the blue I would assume there are already blocks in drawing B with the same names like the blocks imported from drawing A and the insert option is not set to overwrite blocks.
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

HappyShat
Active Member
Posts: 37
Joined: Thu Jul 25, 2019 9:43 pm

Re: Unit confusion when copying Blocks

Post by HappyShat » Sun Oct 16, 2022 9:53 pm

Sorry, the reason why Drawing B had the MCX block is because I had previously copied the MCX block over from Drawing A. I should have sent clean drawings.

I've attached Drawing A v2 and Drawing B v2. This time Drawing B v2 does not have the MCX block - yet has the same scale issue. Other blocks when copied from A to B exhibit the same problem.
Attachments
Drawing_B_v2.DWG
(219.34 KiB) Downloaded 224 times
Drawing_A_v2.dwg
(38.33 KiB) Downloaded 204 times

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4935
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Unit confusion when copying Blocks

Post by Husky » Sun Oct 16, 2022 10:18 pm

Very confusing!

You told us:
HappyShat wrote:
Sun Oct 16, 2022 7:03 pm
  • Drawing A and Drawing B are have units mm
Now the new example drawings are in:
Drawing_A_v2.dwg is in mm
and
Drawing_B_v2.DWG is in inch

Which statement is correct?
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

HappyShat
Active Member
Posts: 37
Joined: Thu Jul 25, 2019 9:43 pm

Re: Unit confusion when copying Blocks

Post by HappyShat » Sun Oct 16, 2022 10:33 pm

Yeah, that's what I was thinking the problem was - Drawing B is really in inches. Drawing B was exported from another CAD program - and that export was set to mm. The confusing bit is that both drawings appear to be in mm - when measured using the dimension. I did check drawing preferences and both drawings were set for metric.

EDIT - actually that isn't true. Drawing B v2 preferences are inches. I think what likely occurred was roughly this:
1) Drawing B came in as inches
2) I copied a block from A to B
3) I set drawing B to mm while troubleshooting but failed to realize the MCX block was now in drawing B with the old units
Oy Vey! I'm REALLY ready to put this behind me and get back to work now. Thanks for your help!
Last edited by HappyShat on Sun Oct 16, 2022 10:55 pm, edited 1 time in total.

HappyShat
Active Member
Posts: 37
Joined: Thu Jul 25, 2019 9:43 pm

Re: Unit confusion when copying Blocks

Post by HappyShat » Wed May 10, 2023 8:08 pm

I just ran into this problem again today (six months later). So, I've identified what I believe to be root cause and now I'm documenting for future reference.
  1. I Export a DXF/DWG from Altium Designer (export units in Altium set to mm) - Let's call this Drawing C
  2. Upon opening Drawing C (the exported DXF/DWG) in QCAD units appear correct but 1mm is really 1 inch in QCAD - The units in QCAD need to be changed - but I don't know this yet.
  3. I copy a block to Drawing C from a different QCAD file that is known & verified to be set in mm. Let's call this Drawing D. Saying it again: I copy a block from Drawing D to Drawing C. Drawing D is in mm. Drawing C is in inches.
  4. At this point I realize that Drawing C is in inches. I change drawing C to mm and delete the block drawing. HOWEVER the block name still exists in the Block List (again I just don't know that)
  5. I repeat copying the same block with the same block name from Drawing D to Drawing C. This is when I notice that just before clicking the mouse to place the block I see a rectangle of the correct size - as if the block now has the correct size. But, as soon as I place the block from Drawing D into Drawing C the size remains incorrect - too small. The block is still the wrong size. I'm now confused again.
  6. I fix the issue by deleting the block name in Drawing C from the Block List. Now I can copy the desired block from Drawing C to Drawing D without a problem
As @Husky pointed out there is an insert option that will overwrite blocks. I haven't found this setting just yet - but, I'll look around for that.

Post Reply

Return to “QCAD 'How Do I' Questions”