Jump to content


Photo

Import AVX Key lost


6 replies to this topic

#1 MarioRainer

MarioRainer

    Advanced Member

  • Members
  • PipPipPip
  • 58 posts
  • Location:Germany

Posted 23 August 2013 - 08:42 AM

Hi,

 

if I'm importing an exist AVX file into another

some HandleKeys are incorrectly assigned but the most HandleKeys are lost.

 

Is there any an solution?

 

I'm using the avax.ocx for VB 6.0 and the avax.dll for NET.

 

The Problem is in both Tools the same.

 

best regards

 

MarioRainer

Attached Thumbnails

  • Snap1.png

Edited by MarioRainer, 23 August 2013 - 08:52 AM.


#2 Athanasios Gardos

Athanasios Gardos

    Administrator

  • Admin
  • 360 posts
  • Gender:Male

Posted 28 August 2013 - 12:07 PM

We will see it.


Athanasios Gardos
Avax-Software.com

#3 Athanasios Gardos

Athanasios Gardos

    Administrator

  • Admin
  • 360 posts
  • Gender:Male

Posted 07 September 2013 - 09:55 AM

Option Explicit

Private Sub Form_Load()
    Dim h() As Long
    ReDim h(1) As Long
    Dim lMax As Long, lCnt As Long
    Dim sTmp As String
    On Local Error Resume Next
    Kill App.Path & "\test1.avx"
    Call cAvax1.StartAvax(App.Path & "\test1.avx")
    h(1) = cAvax1.Add_Line(0, 0, 0, 10, 10, 0)
    Call cAvax1.SetHandleKey(h(1), "key 1")
    cAvax1.Command = AutoLimits_c
    cAvax1.Command = Save_c 'Save File: test1.avx
    
    Kill App.Path & "\test2.avx"
    Call cAvax1.StartAvax(App.Path & "\test2.avx")
    h(1) = cAvax1.Add_Line(10, 0, 0, 10, 10, 0)
    Call cAvax1.SetHandleKey(h(1), "key 2")
    cAvax1.Command = AutoLimits_c
    cAvax1.Command = Save_c 'Save File: test2.avx
    
    Call cAvax1.StartAvax(App.Path & "\test1.avx") 'Open File: test1.avx
    
    h(1) = cAvax1.Add_AVX(App.Path & "\test2.avx", 0, 0, 0) 'Import File: test2.avx
    cAvax1.Command = AutoLimits_c
    
    Call cAvax1.SelectItems(h())
    cAvax1.Command = Explode_Block_c 'Expode test2.avx
    
    lMax = cAvax1.GetAllHandlesArr(h())
    For lCnt = 1 To lMax
        sTmp = sTmp & cAvax1.GetHandleKey(h(lCnt)) & vbCrLf
    Next lCnt
    MsgBox sTmp, vbInformation, "KEYS"
    
End Sub

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


Using Add_AVX function you take as a result an avax handle for a block. You have to explode this block.

Have a look at the code above.


Athanasios Gardos
Avax-Software.com

#4 MarioRainer

MarioRainer

    Advanced Member

  • Members
  • PipPipPip
  • 58 posts
  • Location:Germany

Posted 12 September 2013 - 07:14 AM

I use the following code.

 

After explode the block the Key are missing.

 

 

Private Function ImportAVX(sAVXFile As String) As Boolean
    On Error GoTo Fehler
    Dim mReturn As Long
   
    If IsFile(sAVXFile) = True Then
        cAvax1.AutoRedraw = False
        Screen.MousePointer = vbHourglass
        mReturn = cAvax1.Add_AVX(sAVXFile, 0, 0, 0)
        cAvax1.Command = AutoLimits_c
        Screen.MousePointer = vbDefault
        cAvax1.AutoRedraw = True
          
        If mReturn <> 0 Then
            ImportAVX = True
        End If
    End If

Exit Function
Fehler:
MsgBox "Error: " + Err.Number + vbNewLine + Err.Description, vbCritical, App.Title
End Function

Attached Files



#5 Athanasios Gardos

Athanasios Gardos

    Administrator

  • Admin
  • 360 posts
  • Gender:Male

Posted 20 September 2013 - 02:53 PM

I can't see the problem. I used the following code and I got back the keys:

 

Option Explicit

Private Sub Form_Load()
    Dim h() As Long
    ReDim h(1) As Long
    Dim lMax As Long, lCnt As Long
    On Local Error Resume Next
    
    Call cAvax1.StartAvax
    
    h(1) = cAvax1.Add_AVX(App.Path & "\Ruhrort.AVX", 0, 0, 0)
    cAvax1.Command = AutoLimits_c
    
    Call cAvax1.SelectItems(h())
    cAvax1.Command = Explode_Block_c 'Expode test2.avx
    
    lMax = cAvax1.GetAllHandlesArr(h())
    For lCnt = 1 To lMax
        Debug.Print cAvax1.GetHandleKey(h(lCnt))
    Next lCnt
    
End Sub

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


Athanasios Gardos
Avax-Software.com

#6 MarioRainer

MarioRainer

    Advanced Member

  • Members
  • PipPipPip
  • 58 posts
  • Location:Germany

Posted 20 September 2013 - 08:20 PM

Hi,

 

if I import the drawing, (AVAX_Drawing.zip) see the Appendix, into an existing drawing, then the keys are missing.

 

Please try this.

 

Thx

MarioRainer



#7 MarioRainer

MarioRainer

    Advanced Member

  • Members
  • PipPipPip
  • 58 posts
  • Location:Germany

Posted 23 September 2013 - 04:42 PM

Hi

i have found the Problem.

 

There is some differend between Explode_Block_c  and Expode.

 

Private Sub Menu_Explode_Click()
    If isBlock Then
        cAvax1.Command = 113
    Else
        cAvax1.Command = 54
    End If
End Sub

 

MarioRainer





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users