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