![]() |
【转帖】how to read the override dimstyle
how to read the override dimstyle?
how to read the override dimstyle? hi, a dwg file maybe have some override dimstyle? such as in attach picture. attached images dimensions besides reference to dimstyle may have overrides for all dim* variables. they are stored as xdata attached to dimension entity. in dwgdirect oddbdimension has functions like dimadec(), dimalt(), ..., setdimadec(), setdimalt() .... functions returning a value determine if a dimension entity has override. if yes it returns overridden value. if not - the value from dimstyle. if you need to get multiple dim variables the most efficient way is using getdimstyledata() function (you'll avoid parsing xdata multiple times). database also may have overrides for dim* values. they are stored as database variables. oddbdatabase also have functions like dimadec(), dimalt(), ..., setdimadec(), setdimalt() .... if a function like oddbdatabase::dimadec() returns a value different from corresponding value in current dimstyle - this variable is overridden. sergey slezkin can you please tell me... what is written in the definition (body) of these generic functions. actually i want to learn how this kind of function is created.... it will help me alot in creating these kind of functions. thanks alot.. the function i am asking about is... code: // file dbdimension.h /** { secret } */ #define var_def(a, b, dxf, c, d, r1, r2) \ /** returns the dim##b value of this dimension entity. */ \ virtual a dim##b() const; \ /** sets the dim##b value of this dimension entity. */ \ virtual void setdim##b(a); #include "dimvardefs.h" #undef var_def .................................................. ......................... last edited by niteshsingh_007; 31st october 2006 at 03:28 amfff">. my problem is that i have my dimension class which has oddbdimentionptr as member. so if i want to use these functions like dimtxt() etc.. i have to have one function in my class also.. please tell me how i can do.. other wise i have to add these function one by one.. and that will increase my code length.. thanks.. please reply as early as possible... .................................................. ......................... |
所有的时间均为北京时间。 现在的时间是 01:16 PM. |