School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!
Welcome to Dream.In.Code
Become an Expert!

Join 340,158 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 4,069 people online right now. Registration is fast and FREE... Join Now!



convert *.dwg files to *.vdf using vb 6

convert *.dwg files to *.vdf using vb 6 Rate Topic: -----

#1 LtSwapnil  Icon User is offline

  • New D.I.C Head
  • Pip
  • Group: New Members
  • Posts: 3
  • Joined: 03-May 09


Dream Kudos: 0

Post icon  Posted 03 May 2009 - 11:13 PM

I am trying to use a converter (an exe file) to convert *.dwg files to *.vdf through code. I am using following code which is not working.
<code> Dim AppPath As String
Dim val As Integer
val = 1
parameters = "? " + sourcefilename + "? " + destfilename
AppPath = App.Path & "\vdconv.exe"
success = VDPro1.VdShellExecute("", AppPath, parameters, val) <code>
is there any other method to do this?
Was This Post Helpful? 0
  • +
  • -


#2 firebolt  Icon User is offline

  • D.I.C Lover
  • Icon
  • View blog
  • Group: Author w/DIC++
  • Posts: 5,555
  • Joined: 20-February 09


Dream Kudos: 1675

Posted 03 May 2009 - 11:23 PM

Please post your code like this: :code:
Was This Post Helpful? 0
  • +
  • -

#3 LtSwapnil  Icon User is offline

  • New D.I.C Head
  • Pip
  • Group: New Members
  • Posts: 3
  • Joined: 03-May 09


Dream Kudos: 0

Posted 05 May 2009 - 10:41 PM

Dim AppPath As String
	Dim val As Integer
	val = 1
	parameters = "? " + sourcefilename + "? " + destfilename
	AppPath = App.Path & "\vdconv.exe"
	success = VDPro1.VdShellExecute("", AppPath, parameters, val)

Was This Post Helpful? 0
  • +
  • -

#4 firebolt  Icon User is offline

  • D.I.C Lover
  • Icon
  • View blog
  • Group: Author w/DIC++
  • Posts: 5,555
  • Joined: 20-February 09


Dream Kudos: 1675

Posted 05 May 2009 - 11:19 PM

What is the success? Have you declared it?
Was This Post Helpful? 0
  • +
  • -

#5 LtSwapnil  Icon User is offline

  • New D.I.C Head
  • Pip
  • Group: New Members
  • Posts: 3
  • Joined: 03-May 09


Dream Kudos: 0

Posted 06 May 2009 - 03:38 AM

The full code is as follows
everything is going well except exe not getting executed

Private Sub vdraw_NeedFileConvert(FileToOpen As String, TempFileName As String, ByVal CadVer As VDProLib5.VdConstFileVer, success As Boolean)

Dim parameters As String
Dim destfilename As String
Dim src As String
Dim actions As Long

destfilename = TempFileName
src = FileToOpen
success = False
actions = vdraw.ActionValidates
If Not (actions And 4194304) = 4194304 Then actions = actions + 4194304
If Not (actions And 8388608) = 8388608 Then actions = actions + 8388608

parameters = "? " + src + "? " + destfilename + "? " + CStr(CadVer) + " ? 1024 ? 768" + " ? " + CStr(actions) + " ? 0 ? 0 ? 1"
	
Dim appPath As String
Dim val As Integer
val = 1
			 
  appPath = app.path &"\vdconv.exe"
  success = vdraw.VdShellExecute("", appPath, parameters, val)
	
End Sub

This post has been edited by LtSwapnil: 06 May 2009 - 03:42 AM

Was This Post Helpful? 0
  • +
  • -



Fast Reply

  

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



Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month