查看单个帖子
旧 2009-05-04, 05:41 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】change dynamic propierties

change dynamic propierties
change dynamic propierties
when change a property of the following form:
code:
oddbdynblockreference dynamicreference( br );

if ( dynamicreference.isdynamicblock() )
{
oddbdynblockreferencepropertyarray dynamicproperties;
dynamicreference.getblockproperties( dynamicproperties );
for (int i = 0; i < dynamicproperties.length(); i++)
{
if ( dynamicproperties[i]->propertyname() == acadparamname )
{
odresbuf::valuetype vt = dynamicproperties[i]->propertytype();
odresbufptr valresbuf = odresbuf::newrb( vt, value );
if (!dynamicproperties[i]->setvalue( valresbuf ))
{
std::cout << "parametro no actualizado" << std::endl;
}
}
}
}
the values is updated to me but the result of the drawing is not correct.
upload to the original file and the modified file...
very thanks...
attached files
'stretch' action in dynamic block calls movestretchpoints() of affected entities.
movestretchpoints() is not implemented by default (it calls transformby).
implementation of movestretchpoints/movegrippoints is left to the user, see \examples\grippoints\*.cpp
vladimir
the difference between .dwg created by my, and the created one by odamfcappdll is this:
the acdbxrecord can have some importance??
code:
<acdbblockreference>. . . . . . . [125]
name. . . . . . . . . . . . . . *u29
position. . . . . . . . . . . . [0.0 0.0 0.0]
rotation. . . . . . . . . . . . 0.0d
scale factors . . . . . . . . . [1.0 1.0 1.0]
normal. . . . . . . . . . . . . [0.0 0.0 1.0]
min extents . . . . . . . . . . [-0.0 0.0 0.0]
max extents . . . . . . . . . . [115.0 100.0 0.0]
layer . . . . . . . . . . . . . 0
color index . . . . . . . . . . 256
color . . . . . . . . . . . . . bylayer
linetype. . . . . . . . . . . . bylayer
ltscale . . . . . . . . . . . . 1.0
lineweight. . . . . . . . . . . klnwtbylayer
plot style. . . . . . . . . . . bylayer
transparency method . . . . . . 0
visibility. . . . . . . . . . . kvisible
planar. . . . . . . . . . . . . true
planarity . . . . . . . . . . . kplanar
origin. . . . . . . . . . . . [0.0 0.0 0.0]
u-axis. . . . . . . . . . . . [1.0 0.0 0.0]
v-axis. . . . . . . . . . . . [0.0 1.0 0.0]
acad_xdictionary. . . . . . . . . <acdbdictionary>
acdbblockrepresentation . . . . <acdbdictionary>
acdbrepdata . . . . . . . . . <acdbproxyobject>
appdatacache. . . . . . . . . <acdbdictionary>
acad_enhancedblockdata. . . <acdbdictionary>
. . . . . . . . . . . . . <acdbxrecord>
xdata:
1071. . . . . . . . . 6895636
1071. . . . . . . . . 9291323
70. . . . . . . . . . 27
70. . . . . . . . . . 1
40. . . . . . . . . . 0.0
. . . . . . . . . . . . . <acdbxrecord>
xdata:
1071. . . . . . . . . 6895636
1071. . . . . . . . . 9291323
70. . . . . . . . . . 27
70. . . . . . . . . . 1
40. . . . . . . . . . 0.0
acad_enhancedblockhdata . . <acdbdictionary>
107 . . . . . . . . . . . <acdbxrecord>
xdata:
1071. . . . . . . . . 18597260
1071. . . . . . . . . 25303744
70. . . . . . . . . . 25
70. . . . . . . . . . 104
10. . . . . . . . . . [90.0 7.5 0.0]
10. . . . . . . . . . [90.0 92.5 0.0]
10. . . . . . . . . . [0.0 0.0 -1.0]
115 . . . . . . . . . . . <acdbxrecord>
xdata:
1071. . . . . . . . . 6895636
1071. . . . . . . . . 9291323
70. . . . . . . . . . 25
70. . . . . . . . . . 104
40. . . . . . . . . . 0.0
59. . . . . . . . . . . . <acdbxrecord>
xdata:
1071. . . . . . . . . 18597260
1071. . . . . . . . . 25303744
70. . . . . . . . . . 25
70. . . . . . . . . . 104
10. . . . . . . . . . [7.5 92.5 0.0]
10. . . . . . . . . . [90.0 92.5 0.0]
10. . . . . . . . . . [0.0 0.0 -1.0]
70. . . . . . . . . . . . <acdbxrecord>
xdata:
1071. . . . . . . . . 6895636
1071. . . . . . . . . 9291323
70. . . . . . . . . . 25
70. . . . . . . . . . 104
40. . . . . . . . . . 0.0
code:
<acdbblockreference>. . . . . . . [125]
name. . . . . . . . . . . . . . *u29
position. . . . . . . . . . . . [0.0 0.0 0.0]
rotation. . . . . . . . . . . . 0.0d
scale factors . . . . . . . . . [1.0 1.0 1.0]
normal. . . . . . . . . . . . . [0.0 0.0 1.0]
min extents . . . . . . . . . . [-0.0 0.0 0.0]
max extents . . . . . . . . . . [215.0 100.0 0.0]
layer . . . . . . . . . . . . . 0
color index . . . . . . . . . . 256
color . . . . . . . . . . . . . bylayer
linetype. . . . . . . . . . . . bylayer
ltscale . . . . . . . . . . . . 1.0
lineweight. . . . . . . . . . . klnwtbylayer
plot style. . . . . . . . . . . bylayer
transparency method . . . . . . 0
visibility. . . . . . . . . . . kvisible
planar. . . . . . . . . . . . . true
planarity . . . . . . . . . . . kplanar
origin. . . . . . . . . . . . [0.0 0.0 0.0]
u-axis. . . . . . . . . . . . [1.0 0.0 0.0]
v-axis. . . . . . . . . . . . [0.0 1.0 0.0]
acad_xdictionary. . . . . . . . . <acdbdictionary>
acdbblockrepresentation . . . . <acdbdictionary>
acdbrepdata . . . . . . . . . <acdbproxyobject>
appdatacache. . . . . . . . . <acdbdictionary>
acad_enhancedblockdata. . . <acdbdictionary>
107 . . . . . . . . . . . <acdbxrecord>
xdata:
1071. . . . . . . . . 18597260
1071. . . . . . . . . 25303744
70. . . . . . . . . . 27
70. . . . . . . . . . 1
10. . . . . . . . . . [90.0 7.5 0.0]
10. . . . . . . . . . [90.0 92.5 0.0]
10. . . . . . . . . . [0.0 0.0 -1.0]
115 . . . . . . . . . . . <acdbxrecord>
xdata:
1071. . . . . . . . . 6895636
1071. . . . . . . . . 9291323
70. . . . . . . . . . 27
70. . . . . . . . . . 1
40. . . . . . . . . . 0.0
59. . . . . . . . . . . . <acdbxrecord>
xdata:
1071. . . . . . . . . 18597260
1071. . . . . . . . . 25303744
70. . . . . . . . . . 27
70. . . . . . . . . . 1
10. . . . . . . . . . [7.5 92.5 0.0]
10. . . . . . . . . . [207.5 92.5 0.0]
10. . . . . . . . . . [0.0 0.0 -1.0]
70. . . . . . . . . . . . <acdbxrecord>
xdata:
1071. . . . . . . . . 6895636
1071. . . . . . . . . 9291323
70. . . . . . . . . . 27
70. . . . . . . . . . 1
40. . . . . . . . . . 0.0
sorry, i don't understand your question.
vladimir
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)