Export a Block to dxf? [SOLVED]
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
-
- Active Member
- Posts: 36
- Joined: Wed Jul 12, 2023 2:58 pm
- Location: Florida
Export a Block to dxf? [SOLVED]
Is subject possible with QCAD 3.28.1? I believe its possible with AutoCAD..... I would be interested to work on it......
Last edited by Joseph1916 on Sat Aug 05, 2023 11:08 pm, edited 1 time in total.
Re: Export a Block to dxf?
If you save a block as a library item then this block is saved as a dxf ...
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..."
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
Re: Export a Block to dxf?
Please explain this further, It is not possible to select a block from the Block List and save that.
One can select a single Block Reference entity and create a library item from that entity (BT), no need for a reference position.
Still, this creates a DXF with a block definition and a Block Reference entity at (0,0) in Model_Space.
Downside: One can not 'export' an unused Block aka only the block definition.
Another problem is that one can not 'import' one or a set of unused blocks ...
... Yet 'unused' but intended to start using them in the drawing at hand.
Regards,
CVH
-
- Active Member
- Posts: 36
- Joined: Wed Jul 12, 2023 2:58 pm
- Location: Florida
Re: Export a Block to dxf?
<t>OS: Ubuntu 22.04<br/>
QCAD: 3.28.1<br/>
<br/>
I saw a post about set Reference Point, I believe that would help. I only have one good drawing of my own. Others are from a Surveyor that will reference both to real world coordinate Values and then mix with 0,0 type values that could be a 100's of miles away. Its a problem for Surveyors. I, at least, need to be able to control reference values x and y. For engineers and surveyors the Northing and Easting. Otherwise I am guessing at the real base point. Which is QCAD's Reference.<br/>
<br/>
Does that make sense to you? Exporting Blocks as singular entities with x and y values is the best solution.</t>
QCAD: 3.28.1<br/>
<br/>
I saw a post about set Reference Point, I believe that would help. I only have one good drawing of my own. Others are from a Surveyor that will reference both to real world coordinate Values and then mix with 0,0 type values that could be a 100's of miles away. Its a problem for Surveyors. I, at least, need to be able to control reference values x and y. For engineers and surveyors the Northing and Easting. Otherwise I am guessing at the real base point. Which is QCAD's Reference.<br/>
<br/>
Does that make sense to you? Exporting Blocks as singular entities with x and y values is the best solution.</t>
Re: Export a Block to dxf?
Joseph,
In scripting if you have a block reference in the document then one can set/alter its position with:
When selected a block reference entity has a single selection marker (little blue square) ... The reference point.
The GUI alternative would be setting/moving the block reference entity marker at a specified place or ...
... by changing the position values in the Property Editor.
A block (the block definition) may have an origin set different from (0,0) ... An inverse offset.
You need to evaluate all these values/factors to figure out where and how a copy of the block entities is located in Model_Space.
I am used to create my blocks near their origin without an offset.
What I encounter lately with blocks provided by a customer is that the entities in the block are noway near their origin.
If I add such a block (BI) then QCAD shows a cross-hair but no visible preview of the block itself.
The block entities are there but indeed miles away from the cross-hair ... The reference position.
From a screen video I understand that ACAD displays the block content at the cursor.
On editing such a block for the first time QCAD will auto zoom to the block content.
All fine but one needs to understand that now the block origin is far out of view.
About Northing and Easting:
QCAD zero degree is right, counting counter clock wise ... 90 degrees is up.
This is the standard Math base.
QCAD doesn not provide in a UCS where one could shift, tilled, or mirror the coordinate plane.
Thus North = 0.0° = Up as X and CW is not an option for the time being.
But one can enter coordinates this way and QCAD will translate them.
First you need to explode (XP) the block to its individual entities.
Best preformed on a block reference inserted at the origin with no offset.
Then cut/copy the result of the explosion to a new document keeping reference points (RT/RC).
Save this new document to a new DXF file.
One can then import (Ctrl+Shift+I) such a DXF file as block (First option of the Import Options Toolbar)
QCAD will propose the file name without extension as block name.
On importing it creates the block definition on the fly and places a block reference entity at your cursor.
Do you intend to script exporting blocks that way?
Regards,
CVH
In scripting if you have a block reference in the document then one can set/alter its position with:
Code: Select all
var blockRef; // A reference to a block reference entity (RBlockReferenceEntity)
var position; // A valid position (RVector)
blockRef.setPosition(position);
// One has to recast that to the document to actually change the position of the entity
The GUI alternative would be setting/moving the block reference entity marker at a specified place or ...
... by changing the position values in the Property Editor.
Beside a position in Model_Space block references have a rotation angle and scale factors.
A block (the block definition) may have an origin set different from (0,0) ... An inverse offset.
You need to evaluate all these values/factors to figure out where and how a copy of the block entities is located in Model_Space.
I am used to create my blocks near their origin without an offset.
What I encounter lately with blocks provided by a customer is that the entities in the block are noway near their origin.
If I add such a block (BI) then QCAD shows a cross-hair but no visible preview of the block itself.
The block entities are there but indeed miles away from the cross-hair ... The reference position.
From a screen video I understand that ACAD displays the block content at the cursor.
On editing such a block for the first time QCAD will auto zoom to the block content.
All fine but one needs to understand that now the block origin is far out of view.
About Northing and Easting:
QCAD zero degree is right, counting counter clock wise ... 90 degrees is up.
This is the standard Math base.
QCAD doesn not provide in a UCS where one could shift, tilled, or mirror the coordinate plane.
Thus North = 0.0° = Up as X and CW is not an option for the time being.
But one can enter coordinates this way and QCAD will translate them.
Yes and no ... Not precisely.Joseph1916 wrote: ↑Fri Jul 28, 2023 8:28 pmExporting Blocks as singular entities with x and y values is the best solution.
First you need to explode (XP) the block to its individual entities.
Best preformed on a block reference inserted at the origin with no offset.
Then cut/copy the result of the explosion to a new document keeping reference points (RT/RC).
Save this new document to a new DXF file.
One can then import (Ctrl+Shift+I) such a DXF file as block (First option of the Import Options Toolbar)
QCAD will propose the file name without extension as block name.
On importing it creates the block definition on the fly and places a block reference entity at your cursor.
Do you intend to script exporting blocks that way?
Regards,
CVH
-
- Active Member
- Posts: 36
- Joined: Wed Jul 12, 2023 2:58 pm
- Location: Florida
Re: Export a Block to dxf?
Thank you for the reply. Excellent!!.. Now using that above procedure.First you need to explode (XP) the block to its individual entities.
Best preformed on a block reference inserted at the origin with no offset.
Then cut/copy the result of the explosion to a new document keeping reference points (RT/RC).
Save this new document to a new DXF file.
I will be meeting with a Computer Scientist tomorrow morning going over this issue and QCAD in general.
Joseph1916
Re: Export a Block to dxf?
I don't see an issue with QCAD ... I see odd or incorrect created blocks.
I presume that (some) other Apps create a block from entities with the drawing origin as reference point.
QCAD allows for indicating a reference point when creating a block from selected entities (BC).
That could again be (0,0) absolute of course but we tend to give the block a meaningful origin.
Regards,
CVH
-
- Active Member
- Posts: 36
- Joined: Wed Jul 12, 2023 2:58 pm
- Location: Florida
Re: Export a Block to dxf?
Well said I do not either. My issue with BLOCK is closed.I don't see an issue with QCAD
Thank you for your support.
Joseph1916