Message 1 of 2
Hatch palette dialog
Not applicable
05-16-2012
05:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
On the blog "Through the interface", I saw it was possible to call the hatch palette dialog through .Net or VB.Net. I need to do the same thing in VBA. Unfortuneraly, VBA does not seem to accept IntPtr as a type, so the function doesn't work.
Private Declare Function acedHatchPalletteDialog Lib "acad.exe" Alias "?acedHatchPalletteDialog@@YA_NPB_W_NAAPA_W@Z" (ByVal currentPattern As String, ByVal showcustom As Boolean, ByRef newpattern As IntPtr) As Boolean
Private Sub CGFMHATCH_Click()
Dim sHatchType As String
sHatchType = "ANGLE"
Dim ptr As IntPtr
Dim bRet As Boolean
If acedHatchPalletteDialog(sHatchType, True, ptr) Then
TGFMHATCH.Text = sHatchType
End If
'ThisDrawing.SendCommand "BHATCH" & vbCr
End Sub
Does anybody know a way to make this action work with VBA?
THanks,
Maxime