AVAX-software.com Forums: Import DXF - AVAX-software.com Forums

Jump to content

Page 1 of 1

Import DXF

#1 User is offline   pauly Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 20-September 09

Posted 20 September 2009 - 05:24 PM

I am having trouble importing DXF files. I've tried using different versions of DXF i.e R12-14 etc. and still nothing. When I try this, the Cavax.Add_DXF() call returns false and after that the control seems disabled then I can't even draw. To troubleshoot further I tried to use the AvaxCAD sample code to see if I was at fault (a common occurence) and had the same results. I then decided to try a DWG file and get the same problem. What could cause this?

My code:

Private Sub LoadFile(ByVal Path As String)
      
        Dim sDxfFile As String
        Dim sDxfLayers As String
        Dim x As Single = 0
        Dim y As Single = 0
        Dim z As Single = 0
        Dim vItemProperties As Object
        Dim fNoText As Boolean = False
        Dim fNoBlock As Boolean = False
        Dim fNoDimension As Boolean = False
        Dim vRetHandles As Object
        'Definition of the DXF File Name
        sDxfFile = Path
        ' Import all the Layers
        sDxfLayers = ""
        If CAvax1.Add_DXF(sDxfFile, sDxfLayers, x, y, z, vItemProperties, fNoText, fNoBlock, fNoDimension, vRetHandles) = True Then
            Me.Text = strAppName & " - " & Path
        Else
            MsgBox("Error Opening File")
        End If
End Sub

This post has been edited by Gemalde: 20 September 2009 - 09:12 PM
Reason for edit: Added code tags


#2 User is offline   Athanasios Gardos Icon

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

Posted 21 September 2009 - 08:12 AM

Use the following code.
If it is still not working then please send us the DXF file.
Private Sub Form1_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load

                               cAvax1.StartAvax()

End Sub

               

Private Sub Form1_FormClosed(ByVal eventSender As System.Object, ByVal eventArgs As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed

                               cAvax1.EndAvax()

End Sub

               

Private Sub Command1_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command1.Click

                               Dim sDxfFile As String

                               Dim sDxfLayers As String

                               Dim x As Single

                               Dim y As Single

                               Dim z As Single

                               Dim vItemProperties As Object

                               Dim fNoText As Boolean

                               Dim fNoBlock As Boolean

                               Dim fNoDimension As Boolean

                               Dim vRetHandles As Object

                               Dim AvaxHandle As Boolean
                           

                               sDxfFile = "C:\Sample.DXF"  
 

                               sDxfLayers = ""

                               

                               AvaxHandle = cAvax1.Add_DXF(sDxfFile, sDxfLayers, x, y, z, vItemProperties, fNoText, fNoBlock, fNoDimension, vRetHandles)

End Sub

Athanasios Gardos
Avax-Software.com

#3 User is offline   pauly Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 20-September 09

Posted 22 September 2009 - 02:33 AM

Still the same outcome. I will send a file to you.

This post has been edited by pauly: 22 September 2009 - 02:34 AM


#4 User is offline   Athanasios Gardos Icon

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

Posted 01 October 2009 - 08:56 AM

It was a bug at our DXF import code that we have corrected.
You can download the latest AVAX version to see the correction.
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