VbaCallCPG.bas 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. Attribute VB_Name = "VbaCallCPG"
  2. #If VBA7 Then
  3. Private Declare PtrSafe Function vbadll Lib "lycpg64.cpg" (ByVal code As Long, ByVal x As Double) As Long
  4. #Else
  5. Private Declare Function vbadll Lib "lycpg32.cpg" (ByVal code As Long, ByVal x As Double) As Long
  6. #End If
  7. Sub VBA调用CPG_CDR复制物件到AI()
  8. ret = vbadll(2, 0)
  9. MsgBox "CDR复制物件到AI 功能 " & ret
  10. End Sub
  11. Sub AI复制物件到CDR()
  12. ret = vbadll(1, 0)
  13. MsgBox "AI复制物件到CDR 功能 " & ret
  14. End Sub
  15. Sub Clear_Fill()
  16. ret = vbadll(3, 0)
  17. MsgBox "Clear_Fill功能 " & ret
  18. End Sub
  19. Sub cql_FillColor()
  20. ret = vbadll(5, 0)
  21. End Sub
  22. Sub Shapes_Filp()
  23. ret = vbadll(4, 0)
  24. End Sub
  25. Sub cql_OutlineColor()
  26. ret = vbadll(6, 0)
  27. End Sub
  28. Sub cql_SameSize()
  29. ret = vbadll(7, 0)
  30. End Sub
  31. Sub fill_red()
  32. ret = vbadll(8, 0)
  33. End Sub
  34. '// 第9号功能: 按边界批量绘制矩形 参数:正数向外,负数向内
  35. Sub BBox_DrawRectangle()
  36. ret = vbadll(9, 0#)
  37. End Sub
  38. '// 第10号功能: 智能群组功能 参数:正数 向外容差 负数 向内容差
  39. Sub Box_AutoGroup()
  40. ret = vbadll(10, 1#)
  41. End Sub
  42. '// 第11号功能: 异形群组功能
  43. Sub BoundaryGroup()
  44. ret = vbadll(11, 0)
  45. End Sub
  46. Sub Open_LYCPG()
  47. ret = vbadll(888, 8)
  48. End Sub