诚恳的请求大家帮帮忙,怎么用C#实现在AutoCAD中插入光栅图像?我看到过VBA的代码如下:
Dim insertionPoint(0 To 2) As Double Dim scalefactor As Double Dim rotationAngle As Double Dim imageName As String Dim rasterObj As AcadRasterImage Dim pt_Pick As Variant imageName = "C:\CNSI_Demo\Pictures\" & Current_ProductID & ".jpg" insertionPoint(0) = 5#: insertionPoint(1) = 5#: insertionPoint(2) = 0# scalefactor = 300 rotationAngle = 0 pt_Pick = ThisDrawing.Utility.GetPoint(, "插入点:") Set rasterObj = ThisDrawing.ModelSpace.AddRaster(imageName, pt_Pick, scalefactor, rotationAngle)
可我要用C#实现它,有人可以帮帮我吗?谢谢了! |