tentative points in basic macros

Discussion in 'Microstation' started by frawo, Mar 12, 2006.

  1. frawo

    frawo Guest

    hello everybody,

    i'm just a total newbie in basic macro programming so this is probably
    a
    stupid question...
    i just played around a little bit with some examples and the macro
    recorder...
    i do not understand how to pass a tentative point to a macro. e.g. the
    following (recorded with the macro recorder and modified):

    Sub main
    Dim startPoint As MbePoint
    Dim point As MbePoint, point2 As MbePoint

    MbeSendCommand "PLACE LINE CONSTRAINED "

    startPoint.x = 72.065966#
    startPoint.y = -115.007869#
    startPoint.z = -0.000035#

    point.x = startPoint.x
    point.y = startPoint.y
    point.z = startPoint.z
    MbeSendDataPoint point, 1%

    point.x = startPoint.x + x-value 'calculated by some subroutine
    point.y = startPoint.y + y-value 'calculated by some subroutine
    point.z = startPoint.z
    MbeSendDataPoint point, 1%

    MbeSendReset

    MbeSendCommand "PLACE LINE CONSTRAINED "

    point.x = startPoint.x + x-value
    point.y = startPoint.y + y-value
    point.z = startPoint.z
    MbeSendTentPoint point, 1%
    ' recorded- clicked snap icon- clicked snap center
    point.x = startPoint.x + 4.392452# 'how can i get here the result
    of the snap ?????
    point.y = startPoint.y + 1.783401#
    point.z = startPoint.z
    MbeSendDataPoint point, 1%

    point.x = startPoint.x + 7.904211#
    point.y = startPoint.y - 2.047609#
    point.z = startPoint.z
    MbeSendDataPoint point, 1%

    MbeSendReset
    End Sub

    this should be drawing a 2nd line starting in the center of the first
    line
    but how to hand over the center point?
    who can help me?
     
    frawo, Mar 12, 2006
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.