VB School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a VB Expert!

Join 306,814 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,674 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

LtSwapnil

3 May, 2009 - 11:13 PM
Post #1

New D.I.C Head
*

Joined: 3 May, 2009
Posts: 3

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?

User is offlineProfile CardPM
+Quote Post


firebolt

RE: Convert *.dwg Files To *.vdf Using Vb 6

3 May, 2009 - 11:23 PM
Post #2

D.I.C Lover
Group Icon

Joined: 20 Feb, 2009
Posts: 5,475



Thanked: 77 times
Dream Kudos: 1675
My Contributions
Please post your code like this: code.gif

User is online!Profile CardPM
+Quote Post

LtSwapnil

RE: Convert *.dwg Files To *.vdf Using Vb 6

5 May, 2009 - 10:41 PM
Post #3

New D.I.C Head
*

Joined: 3 May, 2009
Posts: 3

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)

User is offlineProfile CardPM
+Quote Post

firebolt

RE: Convert *.dwg Files To *.vdf Using Vb 6

5 May, 2009 - 11:19 PM
Post #4

D.I.C Lover
Group Icon

Joined: 20 Feb, 2009
Posts: 5,475



Thanked: 77 times
Dream Kudos: 1675
My Contributions
What is the success? Have you declared it?
User is online!Profile CardPM
+Quote Post

LtSwapnil

RE: Convert *.dwg Files To *.vdf Using Vb 6

6 May, 2009 - 03:38 AM
Post #5

New D.I.C Head
*

Joined: 3 May, 2009
Posts: 3

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

CODE
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: 6 May, 2009 - 03:42 AM
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/20/09 10:04PM

Live VB Help!

Be Social

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

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month