AVAX-software.com Forums: Preset Objects properties - AVAX-software.com Forums

Jump to content

Page 1 of 1

Preset Objects properties

#1 User is offline   hamipers Icon

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 50
  • Joined: 06-May 05
  • Location:Ker
  • Interests:ASP.NET<br />C#.NET<br />MS SQL Server 2000<br />Delphi<br />.<br />.<br />.<br />Painting<br />Sculpture<br />Music<br />Thinking

Posted 29 May 2005 - 06:16 PM

Hi,

This may be regarded as a general question. I mean it can be applied to any other command used in Avax than drawing a circle. I need to let the end user to draw a circle (or any other shape) that has a specified set of properties. For example for the circle, I want it to have a radius of 2 and the center point is (10,10). So the user won't need to move the mouse pointer and draw a circle. He will just need to specify the center point by a single click. Not to keep draging to determine the radius as well.
I would like to know how I would achieve this not only for a circle drawing, but for other stuff (or other commands which I need to supply some data for).

Thanks a lot in advance

#2 User is offline   Athanasios Gardos Icon

  • Administrator
  • Icon
  • Group: Admin
  • Posts: 333
  • Joined: 21-March 05
  • Gender:Male

Posted 30 May 2005 - 06:06 AM

Option Explicit

Dim R As Single

Private Sub cAvax1_SelectedPoints(SelectId As String, lPointNumber As Long, x1() As Single, y1() As Single, z1() As Single)
   If SelectId = "Select 1 point" Then
      If lPointNumber = 1 Then
         Call cAvax1.Add_Circle(x1(1), y1(1), z1(1), R)
      End If
   End If
End Sub

Private Sub Command1_Click()
   Dim sSelectID As String
   Dim lPointToSelect As Long
   Dim x() As Single, y() As Single, z() As Single
   sSelectID = "Select 1 point"
   lPointToSelect = 1
   Call cAvax1.SelectPoints(sSelectID, lPointToSelect, x(), y(), z())
End Sub

Private Sub Form_Load()
   Command1.Caption = "Select 1 point"
   Call cAvax1.StartAvax
   R = 5
End Sub

Private Sub Form_Unload(Cancel As Integer)
   Call cAvax1.EndAvax
End Sub

Athanasios Gardos
Avax-Software.com

Page 1 of 1


Fast Reply

  

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users