See the top rated post in this thread. Click here

Results 1 to 6 of 6

Thread: drawline without GetMethod

  1. #1
    Member
    Join Date
    2018-04
    Posts
    10
    Login to Give a bone
    0

    Default drawline without GetMethod

    how to draw a line with out using the Get Method?

  2. #2
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    5,640
    Login to Give a bone
    0

    Default Re: drawline without GetMethod

    The AddLine method requires a start point and an end point. How do you plan to get the points? Do you have them in a file or something?
    C:> ED WORKING....

  3. #3
    Member
    Join Date
    2018-04
    Posts
    10
    Login to Give a bone
    0

    Default Re: drawline without GetMethod

    i declared first for user to pick arbitrary point
    with that point i call it as x(0) and x(1)... began to draw line
    y(0) = x(0)
    y(1) = x(1) + 186.5455

    Set line = ThisDrawing.ModelSpace.AddLine(x, y)

    z(0) = y(0) + p(sn - 1) 'here is where_
    z(1) = x(1)

    Set line = ThisDrawing.ModelSpace.AddLine(x, z)

  4. #4
    Member
    Join Date
    2018-04
    Posts
    10
    Login to Give a bone
    0

    Default Re: drawline without GetMethod

    aim to draw this
    dwg.PNG

  5. #5
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    5,640
    Login to Give a bone
    1

    Default Re: drawline without GetMethod

    I would save it as a block and then insert it at the picked point and rotation. Unless the above symbol will always be oriented in the upright position, creating it with lines would be very tedious.
    C:> ED WORKING....

  6. #6
    Member
    Join Date
    2018-04
    Posts
    10
    Login to Give a bone
    0

    Default Re: drawline without GetMethod

    I was going to write the code and loop through every time the span of beam changes.
    Here is a code i have come so far please comment on it.

    Public Sub TestGetPoint()
    Dim varPick As Variant
    '' get input from user

    With ThisDrawing.Utility
    varPick = .GetPoint(, vbCr & "Pick a point: ")
    .Prompt vbCr & varPick(0) & "," & varPick(1)

    'draw the line
    Dim x(0 To 2) As Double
    Dim y(0 To 2) As Double
    Dim z(0 To 2) As Double
    Dim i(0 To 2) As Double
    Dim b(0 To 2) As Double
    Dim c(0 To 2) As Double
    Dim d(0 To 2) As Double
    Dim e(0 To 2) As Double
    Dim j(0 To 2) As Double
    Dim k(0 To 2) As Double
    Dim o As Integer
    Dim sc As Double
    Dim sm As Double
    Dim m As Integer
    Dim n As Integer

    '''' hree needed span(sn).. sn length...
    o = 5
    Dim p(0 To 100) As Double
    Dim f(0 To 100) As Double

    ' span length data
    p(0) = 2700
    p(1) = 2000
    p(2) = 2500
    p(3) = 2500
    p(4) = 2500

    ' column data

    f(0) = 400
    f(1) = 500
    f(2) = 600
    f(3) = 800
    f(4) = 800


    For sn = 1 To o
    'some hw .. if().. statmnt to pik
    If sn = 1 Then

    x(0) = varPick(0)
    x(1) = varPick(1)
    ' no need for go to
    ' _______GoTo_ty______' use the GoTo.. to escape
    '_______GoTo_ty______' use the GoTo.. to escape
    Else

    'here need code to do the first sum.. and assign variable kn to it
    For m = 2 To sn
    If m = 2 Then
    sm = p(m - 2)
    ' MsgBox (sm)
    Else
    sm = sm + p(m - 2)
    ' MsgBox (sm)
    End If
    Next m
    'here also need a code to do the sum .. and asign variable kc to it
    ' sn = 4
    For n = 2 To sn
    If n = 2 Then
    sc = f(n - 1)
    ' MsgBox (sm)
    Else
    sc = sc + f(n - 1)
    ' MsgBox (sm)
    End If
    Next n

    x(0) = varPick(0) + (sm) + (sc) ' dn=ln+cn .. ln = length of span cn = column thic
    'here also need a code to do the sum .. and asign variable kc to it

    ' x(0) = varPick(0) + ((sn - 1) * p(0)) + ((sn - 1) * 400) ' dn=ln+cn .. ln = length of span cn = column thic
    ' here i need smw
    ' use the fibinaci addition schema...
    ' need For loop here for ((sn-1)*3700)...

    x(1) = varPick(1)

    'here some how add the distance.. wanted to varpick(1)+###

    '_______GoTo_ty______start
    End If

    y(0) = x(0)
    y(1) = x(1) + 186.5455

    Set line = ThisDrawing.ModelSpace.AddLine(x, y)

    'here you need to find ln or l(1)... from user..

    z(0) = y(0) + p(sn - 1) 'here is where_
    z(1) = x(1)

    Set line = ThisDrawing.ModelSpace.AddLine(x, z)

    i(0) = z(0)
    i(1) = z(1) + 186.5455

    Set line = ThisDrawing.ModelSpace.AddLine(z, i)

    ' here is where ... beam width is added..b1 say
    b(0) = y(0)
    b(1) = x(1) - 200 '..the length..

    c(0) = y(0)
    c(1) = b(1) - 186.5455

    Set line = ThisDrawing.ModelSpace.AddLine(c, b)
    'ehre s
    ' here needs also sm...
    ' if sm=0.. then === p(0)

    d(0) = b(0) + p(sn - 1) ' here is where l(1) goes
    d(1) = b(1)
    Set line = ThisDrawing.ModelSpace.AddLine(b, d)

    e(0) = d(0)
    e(1) = d(1) - 186.5455

    Set line = ThisDrawing.ModelSpace.AddLine(d, e)

    If sn = 1 Then
    k(0) = c(0) - f(0) ' here add column width c1
    k(1) = c(1)

    j(0) = x(0) - f(0) 'here add c1
    j(1) = y(1) ' jtotal = 2*186.5455 + b1 here add c1
    Set line = ThisDrawing.ModelSpace.AddLine(k, j)
    line.Update
    Else

    line.Update
    End If

    '_____ this is where the (span length of above 1) s1 > 1 ends...

    Next sn 'loop for sn
    End With

    End Sub

Posting Permissions

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