找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 925|回复: 3

[求助]:几个问题,请各位指点一下方向!

[复制链接]
发表于 2006-10-8 18:19:12 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
1。请问怎么用AcGsView来做预览对话框,我研究过SDK里面的例子BlockView,但感觉找不到正确的实现方式。我的目标是实现像AcadViewer里面那样的预览功能。
2。请问怎么控制实体的“超链接”这个属性。
3。请问OPM与Arx的关系是怎么的!?
谢谢指点!
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
发表于 2006-10-10 21:06:59 | 显示全部楼层
这几个问题感觉目前帮不上大忙,但还是把它顶上去。
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

发表于 2006-10-11 08:57:24 | 显示全部楼层
第二个问题的解答:
The following function lists the hyperlinks associated with an entity and allows new hyperlinks to be added in their place. (Error checking is not shown.)

  1.   [FONT=courier new]
  2. void AddHyperlink()
  3. {
  4.     ads_name en;
  5.     ads_point pt;
  6.     AcDbEntity * pEnt;
  7.     AcDbObjectId pEntId;

  8.     // Prompt user to select entity.   
  9.     acedEntSel("\nSelect an Entity:  ", en, pt);

  10.     // Get Object id.
  11.     acdbGetObjectId(pEntId, en);

  12.     // Open object for write.
  13.     acdbOpenObject(pEnt, pEntId, AcDb::kForWrite);

  14.     // The hyperlink collection object is created inside
  15.     // of getHyperlinkCollection
  16.     // below. It is our responsibility to delete it.
  17.     AcDbHyperlinkCollection * pcHCL = NULL;
  18.    
  19.     // Get the hyperlink collection associated with the entity.
  20.     ACRX_X_CALL(pEnt, AcDbEntityHyperlinkPE)->
  21.         getHyperlinkCollection(pEnt, pcHCL, false, true);
  22.    
  23.     // If a hyperlink exists already, say so.
  24.     if (pcHCL->count() != 0)
  25.     {
  26.         AcDbHyperlink * pcHO;

  27.         acutPrintf("\nThe following hyperlink info already exists
  28.             on this entity:");

  29.         // Iterate through collection and print existing hyperlinks.
  30.         int i = 0;
  31.         for (i = 0; i < pcHCL->count(); i++)
  32.         {
  33.             // Get point to current hyperlink object.
  34.             pcHO = pcHCL->item(i);

  35.             acutPrintf("\nHyperlink name: %s", pcHO->name());
  36.             acutPrintf("\nHyperlink location: %s",
  37.                 pcHO->subLocation());
  38.             acutPrintf("\nHyperlink description: %s",
  39.                 pcHO->description());
  40.         }
  41.         acutPrintf("\n** All will be replaced.**");
  42.         
  43.         // Remove existing hyperlinks from collection.
  44.         // RemoveAt will delete objects too.
  45.         for (i = pcHCL->count() - 1; i >= 0; i--)
  46.         {
  47.             pcHCL->removeAt(i);
  48.         }
  49.     }

  50.     // Get new hyperlinks for this entity.
  51.     for (;;)
  52.     {
  53.         acutPrintf("\nEnter null name, location, and description to
  54.             terminate input requests.");
  55.         
  56.         // Prompt user for name and description.
  57.         char sName[100], sLocation[100], sDescription[100];
  58.         if (acedGetString(TRUE, "\nEnter hyperlink name: ", sName)
  59.             != RTNORM)
  60.             acutPrintf("Invalid input\n");
  61.         if (acedGetString(TRUE, "\nEnter hyperlink location: ",
  62.             sLocation) != RTNORM)
  63.             acutPrintf("Invalid input\n");
  64.         if (acedGetString(TRUE, "\nEnter hyperlink description: ",
  65.             sDescription) != RTNORM)
  66.             acutPrintf("Invalid input\n");
  67.    
  68.         // Add hyperlink or exit prompting.
  69.         if (strcmp(sName, "") || strcmp(sLocation, "") ||
  70.            strcmp(sDescription, ""))
  71.            pcHCL->addTail(sName, sDescription, sLocation);
  72.         else
  73.            break;  
  74.     }
  75.    
  76.     // Add these hyperlinks to the selected entity (opened above).
  77.     ACRX_X_CALL(pEnt, AcDbEntityHyperlinkPE)->
  78.         setHyperlinkCollection(pEnt, pcHCL);

  79.     // Delete the collection. The collection will delete all its
  80.     // contained hyperlink objects.
  81.     delete pcHCL;

  82.     // Close the object.
  83.     pEnt->close();
  84. }

  85.   [/FONT]
复制代码
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-10-11 14:01:38 | 显示全部楼层
谢谢两位大侠的关心指导!代码我先研究了!谢谢!
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|申请友链|Archiver|手机版|小黑屋|辽公网安备|晓东CAD家园 ( 辽ICP备15016793号 )

GMT+8, 2024-9-23 20:25 , Processed in 0.407046 second(s), 37 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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