Code Red > .NET
Insert Blocks and INSUNITS
Bennos:
Hello,
I'm currently in the process of creating a class for BlockTableRecords, with in this class i have created an Insert function. Inserting blocks with known scales is not a problem, but i was after was some more information regarding to how autocad deals with the INSUNITS system variable. As when you do a manual insert, it rescales the block to suit the current INSUNITS variable. How is this conversion done, and how would i go about replicating it.
Thanks in advance
Bennos
Kerry:
You may also want to have a look at the system variables INSUNITSDEFSOURCE and INSUNITSDEFTARGET
Bennos:
--- Quote from: Kerry Brown on May 01, 2007, 08:49:38 PM ---You may also want to have a look at the system variables INSUNITSDEFSOURCE and INSUNITSDEFTARGET
--- End quote ---
Thanks Kerry, will check it out.
Found the problem, you need to set the blocktablerecords units value after you add it to the block table.
Kerry:
I've just had a scan of the Managed Class docs
Autodesk.AutoCAD.DatabaseServices.BlockTableRecord Properties
has a Property .Units
You may be able to make use of this.
Bennos:
--- Quote from: Kerry Brown on May 01, 2007, 09:38:47 PM ---I've just had a scan of the Managed Class docs
Autodesk.AutoCAD.DatabaseServices.BlockTableRecord Properties
has a Property .Units
You may be able to make use of this.
--- End quote ---
Thanks for the tip, i have the blocktablerecord units property to the insunits form the source database.
Have another problem, how does autocad determine the scale between millimeters and meters, ie 0.001 and feet to millimeters i.e 304.8.
I need to scale my blockreference to these scales for them to insert at the scaled size.
Navigation
[0] Message Index
[#] Next page
Go to full version