明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1641|回复: 1

求助:如何得到spaceID?

[复制链接]
发表于 2012-2-18 05:29:45 | 显示全部楼层 |阅读模式
下面Create方法中的spaceId怎么得到?也就是模型空间或图纸空间的id.

谢谢

Annotation.Create Method (Autodesk.AutoCAD.Geometry.Point3d, Autodesk.AutoCAD.DatabaseServices.ObjectId, Autodesk.AutoCAD.DatabaseServices.ObjectId, Autodesk.AutoCAD.DatabaseServices.ObjectId, bool, bool)


Create an annotation style based annotation.


C#
void Create(Autodesk.AutoCAD.Geometry.Point3d position, Autodesk.AutoCAD.DatabaseServices.ObjectId styleId, Autodesk.AutoCAD.DatabaseServices.ObjectId targetId, Autodesk.AutoCAD.DatabaseServices.ObjectId spaceId, bool bIgnoreAutoInsertOffset, bool bRetainMinWidths);

[url=]Parameters[/url]
Parameters
Description
Autodesk.AutoCAD.Geometry.Point3d position
Input position of annotation.
Autodesk.AutoCAD.DatabaseServices.ObjectId styleId
Input id of annotation style.
Autodesk.AutoCAD.DatabaseServices.ObjectId targetId
Input id of annotation target.
Autodesk.AutoCAD.DatabaseServices.ObjectId spaceId
Input id of space (e.g. model or paper) to create annotation in.
bool bIgnoreAutoInsertOffset
Input - if true, uses position and ignores Auto-Insert offest values.
bool bRetainMinWidths
Input - if true, annotation graphics retain their original width when text shrinks.





[url=][/url]




发表于 2012-2-18 09:18:20 | 显示全部楼层
public static string ModelSpace
    Autodesk.AutoCAD.DatabaseServices.BlockTableRecord 的成员

public static string PaperSpace
    Autodesk.AutoCAD.DatabaseServices.BlockTableRecord 的成员

public Autodesk.AutoCAD.DatabaseServices.ObjectId CurrentSpaceId { get; }
    Autodesk.AutoCAD.DatabaseServices.Database 的成员
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-25 19:22 , Processed in 0.192990 second(s), 27 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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