Hi there
I need to let the end user draw some predefined shapes that are compound actually. For example two small crossing lines (like + sign). How could I do this? By the way I need to know how I can customize the default icons that you have used in Avax, like Osnap icons on the bottom-left corner or shape icons on the top-right corner. Once i change one of them, everything stops working. By the way I would like to know what the usage of 'Select Add' option in 'Select' menu is.
Thank you
Page 1 of 1
Predefined shapes
#2
Posted 30 May 2005 - 06:27 AM
Hi,
Example on how to make a cross line.
About 'Select Add': When the end user wants to select more than one object he has to press Ctrl button while he is selecting the object. This works when the 'Select Add' operation is enable (cAvax1.Command = SelectAdd_c).
When the 'Select Add' operation is not enable (cAvax1.Command = SelectSub_c) then AVAX unselects the selected objects.
Example on how to make a cross line.
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_Line(x1(1), y1(1) - R, z1(1), x1(1), y1(1) + R, z1(1)) Call cAvax1.Add_Line(x1(1) - R, y1(1), z1(1), x1(1) + R, y1(1), z1(1)) 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
About 'Select Add': When the end user wants to select more than one object he has to press Ctrl button while he is selecting the object. This works when the 'Select Add' operation is enable (cAvax1.Command = SelectAdd_c).
When the 'Select Add' operation is not enable (cAvax1.Command = SelectSub_c) then AVAX unselects the selected objects.
Athanasios Gardos
Avax-Software.com
Avax-Software.com
#4
Posted 30 May 2005 - 09:35 AM
I assume 'Selectpoints' gets me the coordinates of the selected points. But each time I try it, it seems it fails to evaluate x,y and z. So when I try to use the coordinates after 'Call Selectpoints(...)', an error message dialog appears saying I'm using Null references. Also when I use 'Selectpoints' with one point to select and click on the screen, the crossing extended lines of selection remain on the screen and when I use another command or click on any icon, they disappear without setting the coordinates in x,y and z arrays. Would you please tell me what can be wrong with my code?
#5
Posted 30 May 2005 - 11:10 AM
Hi,
cAvax1_SelectedPoints is an event.
In VB.NET appears like this:
About the x(),y(),z() coordinates, please have a look at:Topic 10
You can also send me by e-mail a small example which is not working to see what is going on.
cAvax1_SelectedPoints is an event.
In VB.NET appears like this:
Private Sub cAvax1_SelectedPoints(ByVal sender As Object, ByVal e As AxAvax.__cAvax_SelectedPointsEvent) Handles cAvax1.SelectedPoints End Sub
About the x(),y(),z() coordinates, please have a look at:Topic 10
You can also send me by e-mail a small example which is not working to see what is going on.
Athanasios Gardos
Avax-Software.com
Avax-Software.com
#6
Posted 30 May 2005 - 12:00 PM
Thank u again.
When I use Selectpoints method, 2 crossing lines appear to let me select a point. But once I click on the screen, they stop moving without drawing any shape. I wonder what can be wrong. Also i debugged it. In the lines after Selectpoints, the values of x, y and z arrays are 'Nothing'.
When I use Selectpoints method, 2 crossing lines appear to let me select a point. But once I click on the screen, they stop moving without drawing any shape. I wonder what can be wrong. Also i debugged it. In the lines after Selectpoints, the values of x, y and z arrays are 'Nothing'.
Page 1 of 1
Sign In
Register
Help
Add Reply

MultiQuote