- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone,
I have a routine where I'm inserting blocks based on text content. The blocks come from external .dwg files as well as possible block definitions already inside the drawing.
While the main drawing is in meters (doesn't matter really) the block definitions can be defined in meters, millimeters, centimeters, ... the works.
I'm using the vla-InsertBlock method to insert the blocks on the position of the text, with the text's rotation. But if a block definition has different units than the active drawing, then the block gets inserted with an added scale factor to compensate for the different units.
For example,
rec= block 1000x1000 mm (1x1 meter) - defined in mm
target dwg= units=meter
(vla-InsertBlock ModelSpace (vlax-3d-point '(0 0 0) ) "rec" 1 1 1 0)
The block "rec" will be placed with both the Unit factor 0.001 and the scale xyz 1000. The latter should be 1. This results in a block that is a square km instead of a square m.
Anybody knows how to prevent this, taking into account that I don't know beforehand whether the block or dwg I'm inserting has matching units to the target dwg?
Solved! Go to Solution.