Thiết lập Point Style Marker Size trong Civil3D với ứng dụng API

Yuri Boyka January 28, 2016 0

Nếu bạn muốn tạo mới PointStyle trong Civil 3D và thiết lập các Marker Size, Scale với .NET API. Việc đầu tiên bạn cần phải tạo Point Style mới hoặc truy cập vào Point Style đã có và chỉnh sửa, sau đó thiết lập thuộc tính SizeType hoặc giá trị Scale:

using (Transaction trans = db.TransactionManager.StartTransaction())

{

 

// Tạo một PointStyle mới

// Thiết lập Size và giá trị Scale

 

ObjectId pointStyleId = civilDoc.Styles.PointStyles.Add(“My DEMO Point Style”);

PointStyle pointStyle = pointStyleId.GetObject(OpenMode.ForWrite) asPointStyle;

pointStyle.MarkerType = PointMarkerDisplayType.UseCustomMarker;

pointStyle.CustomMarkerStyle = CustomMarkerType.CustomMarkerX;

pointStyle.CustomMarkerSuperimposeStyle =CustomMarkerSuperimposeType.Circle;

 

// thiết lập kích cỡ Marker sử dụng ‘Drawing Scale’

 

  pointStyle.SizeType = MarkerSizeType.DrawingScale;

  pointStyle.MarkerSize = 0.003;

 

trans.Commit();

}

6a0167607c2431970b019104694fdc970c

Leave A Response »

You must be logged in to post a comment.