Consulting

Results 1 to 12 of 12

Thread: Run-time error "438"

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11
    VBAX Newbie
    Joined
    Apr 2019
    Posts
    1
    Location
    Hey everyone. I'm new here. I have a question related to error 438 (the run-time error code '438' says - Object doesn't support this property or method). Here is my code:


    Option Explicit

    Private Sub Main()
    Dim ru As Double
    ru = CDbl(InputBox("Unesite radijus unutrasnje kruznice ", "Unos radijusa ", 25))
    Dim s As String
    Dim rv As Double
    rv = CDbl(InputBox("Unesite radijus vanjske kruznice "))
    Dim n As Integer
    n = CInt(InputBox("Unesite broj kruznica "))
    s = InputBox("Unesite centar (format x,y,z)", "Unos centra ", "1,1,0")
    Dim v As Variant
    v = Split(s, ",")
    Dim i As Integer
    Dim centar(0 To 2) As Double

    For i = 0 To UBound(v)
    centar(i) = CDbl(v(i))
    Next i

    Dim c As AcadCircle
    Set c = ThisDrawing.ModelSpace.AddCircle(centar, ru)
    c.Update

    Dim centarv As Variant

    Dim PI As Double
    PI = 4# * Math.Atn(1#)
    Dim ugao As Double
    ugao = (2# * PI) / n

    For i = 0 To n - 1
    centarv = ThisDrawing.Utility.PolarPoint(centar, ugao * i, rv + ru)
    c = ThisDrawing.ModelSpace.AddCircle(centarv, rv)
    Next i

    MsgBox "Nacrtano"

    End Sub
    Attached Images Attached Images

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •