明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 776|回复: 2

设置了DBText的对齐方式,和对齐点,但DBText位置没变怎么解决

[复制链接]
发表于 2018-7-19 19:47 | 显示全部楼层 |阅读模式
在当前文档里面这么做没问题。如果我在一个没在CAD里面打开的Database里面这么设,文本的位置不会变,非要设置Position才能变,设置Position还要根据对齐方式和对齐点去反算,而且还很不准,不想这样做。
盼求大神解决


发表于 2022-3-11 13:53 | 显示全部楼层
// For adding a text with an alignment to an in-memory database
// set the working database before using AdjustAlignment
Database prevWorkingDb = HostApplicationServices.WorkingDatabase;
HostApplicationServices.WorkingDatabase = db;
dbText.AdjustAlignment(db);
HostApplicationServices.WorkingDatabase = prevWorkingDb;
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-4-25 13:58 , Processed in 0.401113 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表