shirazbj 发表于 2012-2-18 05:29:45

求助:如何得到spaceID?

下面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);

sectionminus.pngParameters

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.






sectionminus.png




sieben 发表于 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 的成员
页: [1]
查看完整版本: 求助:如何得到spaceID?