高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】setlunits930 Causes My Dimensions To Be 112 What They Shoul
setlunits(3) causes my dimensions to be 1/12 what they shoul
setlunits(3) causes my dimensions to be 1/12 what they should be
i am creating a new dwg file, and if i call setlunits(3); to set up the job as engineering the objects i send to the drawing are 1/12 the size they should be.
i know autocad is "unitless", but it sure looks like autocad is assuming inches when i'm really sending feet. what are the rules? what will it do in metric? will this be different on different people's autocad configurations?
the same thing happened with metric
the job was scaled to 1/12 whether or not i called the following:
setinsunits(6); // meters
setmeasurement(1); // metric
when i closed the units dialog i got the following warning:
for use with architectural or engineering linear units, insert units should be set to inches. are you sure you want to update the values you currently have selected?
could you provide more details please? what do you mean by sending object or feet? in autocad, in dwgdirect? using which api functions?
sergey slezkin
more details
objects: lines (exportline()), arcs, polylines...
feet: in my application distances are in feet, i am exporting using dwgdirect with all the coordinates in feet, in autocad the lengths are displayed in feet but they are off by a factor of 12 in the x and y dimensions.
you already mentioned the reason:
quote:
when i closed the units dialog i got the following warning:
for use with architectural or engineering linear units, insert units should be set to inches. are you sure you want to update the values you currently have selected?
autocad assumes that for architectural or engineering coordinates display drawing must be in inches. it does not do any scaling.
as for insunits it's used only in drag&drop operations.
so you have to scale from feet to inches yourself...
sergey slezkin
where is the documentation?
i don't see anything on that method in the help file or in the sample projects. your software is such a help, but i think you could make a lot of users more productive by dedicating more time to documentation. is there somewhere i should be looking to know about this method? i have a very small knowledge of autocad, but i bet there are many other people using dwgdirect that are struggling as well.
but dimlfac effects only texts of dimension entities. and does not effect coordinates, lengths etc. displaid by autocad in property palette and in other parts of gui.
sergey slezkin
|