macro request - Cloud Drawer

Is there such a possibility of creating a cloud-drawing macro for Draw?  Something that will draws circles at points you click, then it welds them all and deletes the center junk?

By cloud note, I'm referring to the cloud drawer in Acrobat Pro or AutoCAD.

Parents
  • signcoartdtp said:

    Is there such a possibility of creating a cloud-drawing macro for Draw?  Something that will draws circles at points you click, then it welds them all and deletes the center junk?

    By cloud note, I'm referring to the cloud drawer in Acrobat Pro or AutoCAD.

    You can try code below (created na testd on X5) - it’s placing symbol from the symbol library (located on C:\clouds.csl)
    zipped sample library attached (uzip an save to c:\)
    1. click  = symbol called cloud1
    2. shift+click  = symbol called cloud2
    3. ctrl+click  = symbol called cloud3
    4. alt+clik  = symbol called cloud4

    when symbol inserted then it’s reverted to an object
    you can insert symbols repeatedly - until pressing Esc or waiting two seconds from last click (this delay finish macro code)


    Sub Symbol_on_Click()
    Dim SymLibClouds As SymbolLibrary, cloud As Shape, clname As String
    Dim x As Double, y As Double, shift As Long
    Dim b As Boolean
      Set SymLibClouds = SymbolLibraries.Add("C:\clouds.csl", False) 'location of your clouds,i.e.=library with symbols
      b = False
      While Not b
       b = ActiveDocument.GetUserClick(x, y, shift, 2, False, cdrCursorWinCross)
        If Not b Then
        If shift = 0 Then clname = "cloud1"
        If (shift And 1) <> 0 Then clname = "cloud2"
        If (shift And 2) <> 0 Then clname = "cloud3"
        If (shift And 4) <> 0 Then clname = "cloud4"
        Set cloud = ActiveLayer.CreateSymbol(x, y, clname, SymLibClouds)
        cloud.Symbol.RevertToShapes
        End If
      Wend
     SymbolLibraries("C:\clouds.csl").Delete
    End Sub


    Best regards

    Mek 

     

Reply Children