acad.exe link problem!

acad.exe link problem!

SergeLachance
Participant Participant
169 Views
16 Replies
Message 1 of 17

acad.exe link problem!

SergeLachance
Participant
Participant

i have a old rule who working great until a install inventor 2026???

 

i just change the new link but error message!

any body can help me???

sorry for my horrible english!

 

SergeLachance_0-1758638431338.png

my old rule:

 

' Get the DXF translator Add-In.
Dim DXFAddIn As TranslatorAddIn
DXFAddIn = ThisApplication.ApplicationAddIns.ItemById("{C24E3AC4-122E-11D5-8E91-0010B541CD80}")
'Set a reference to the active document (the document to be published).
Dim oDocument As Document
oDocument = ThisApplication.ActiveDocument
Dim oContext As TranslationContext
oContext = ThisApplication.TransientObjects.CreateTranslationContext
oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism
' Create a NameValueMap object
Dim oOptions As NameValueMap
oOptions = ThisApplication.TransientObjects.CreateNameValueMap
' Create a DataMedium object
Dim oDataMedium As DataMedium
oDataMedium = ThisApplication.TransientObjects.CreateDataMedium
' Check whether the translator has 'SaveCopyAs' options
If DXFAddIn.HasSaveCopyAsOptions(oDocument, oContext, oOptions) Then
Dim strIniFile As String
strIniFile = "I:\INVENTOR\ILOGIC\TEMPLATE\DXFOut.ini"
' Create the name-value that specifies the ini file to use.
oOptions.Value("Export_Acad_IniFile") = strIniFile
End If

DOSSIER = ThisDoc.Path
POSITION1 = InStrRev(DOSSIER, "\") 
POSITION2 = Right(DOSSIER, Len(DOSSIER) - POSITION1)

'get DXF target folder path
oFolder = "I:\DOCUMENTS\ARTICLES\" & POSITION2 & "\"
oFileName = ThisDoc.FileName(False) 'without extension

'Check for the PDF folder and create it if it does not exist
If Not System.IO.Directory.Exists(oFolder) Then
    System.IO.Directory.CreateDirectory(oFolder)
End If

For i = 1 To 100
chiffre = i
myFile = oFolder & oFileName & "_Sheet_" & chiffre & ".dxf"
If(System.IO.File.Exists(myFile)) Then
Kill (myFile)
End If
Next i

'Set the destination file name
oDataMedium.FileName = oFolder & oFileName & ".dxf"
oFileName = ThisDoc.FileName(False) 'without extension

'Publish document.
DXFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)
'Launch the dxf file in whatever application Windows is set to open this document type with

myFile2 = oFolder & oFileName & "_Sheet_" & 100 & ".dxf"
If(System.IO.File.Exists(myFile2)) Then
Kill (myFile2)
End If

' Get the DWG translator Add-In.
Dim oDWGAddIn As TranslatorAddIn 
oDWGAddIn = ThisApplication.ApplicationAddIns.ItemById("{C24E3AC4-122E-11D5-8E91-0010B541CD80}")
' Check whether the translator has 'SaveCopyAs' options
If oDWGAddIn.HasSaveCopyAsOptions(oDocument, oContext, oOptions) Then
Dim strIniFile As String
strIniFile = "I:\INVENTOR\ILOGIC\TEMPLATE\DWGOut.ini"
' Create the name-value that specifies the ini file to use.
oOptions.Value("Export_Acad_IniFile") = strIniFile
End If

'get DXF target folder path
oFolder2 = "I:\DOCUMENTS\ARTICLES\" & POSITION2 & "\"
oFileName2 = ThisDoc.FileName(False) 'without extension

'Check for the PDF folder and create it if it does not exist
If Not System.IO.Directory.Exists(oFolder2) Then
    System.IO.Directory.CreateDirectory(oFolder2)
End If

For i = 1 To 100
chiffre2 = i
myFile2 = oFolder2 & oFileName2 & "_Sheet_" & chiffre2 & ".dwg"
If(System.IO.File.Exists(myFile2)) Then
Kill (myFile2)
End If
Next i

'Set the destination file name
oDataMedium.FileName = oFolder2 & oFileName2 & ".dwg"
oFileName2 = ThisDoc.FileName(False) 'without extension

'Publish document.
oDWGAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)
'Launch the dxf file in whatever application Windows is set to open this document type with

myFile2 = oFolder2 & oFileName2 & "_Sheet_" & 100 & ".dwg"
If(System.IO.File.Exists(myFile2)) Then
Kill (myFile2)
End If

question = MessageBox.Show("VEUX-TU OUVRIR AUTOCAD POUR PURGER TES DESSINS???", "OUVERTURE AUTOCAD???", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1)
MultiValue.SetValueOptions(True)
If question = vbYes Then
GoTo OUVERTURE
Else If question = vbNo Then
GoTo FIN
End If

OUVERTURE :
Dim acadExe = "C:\Program Files\Autodesk\AutoCAD 2025\acad.exe"

'MessageBox.Show("N'OUBLIE PAS DE SAUVER EN VERSION 2000, UNE FOIS TON DESSIN PURGER ET DE PURGER TOUTES TES PAGES", "ATTENTION",MessageBoxButtons.OK,MessageBoxIcon.Warning)
Process.Start(acadExe, oFolder2 & oFileName2 & "_Sheet_" & 1 & ".dwg")

FIN:

my new rule with new link of acad:

 

' Get the DXF translator Add-In.
Dim DXFAddIn As TranslatorAddIn
DXFAddIn = ThisApplication.ApplicationAddIns.ItemById("{C24E3AC4-122E-11D5-8E91-0010B541CD80}")
'Set a reference to the active document (the document to be published).
Dim oDocument As Document
oDocument = ThisApplication.ActiveDocument
Dim oContext As TranslationContext
oContext = ThisApplication.TransientObjects.CreateTranslationContext
oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism
' Create a NameValueMap object
Dim oOptions As NameValueMap
oOptions = ThisApplication.TransientObjects.CreateNameValueMap
' Create a DataMedium object
Dim oDataMedium As DataMedium
oDataMedium = ThisApplication.TransientObjects.CreateDataMedium
' Check whether the translator has 'SaveCopyAs' options
If DXFAddIn.HasSaveCopyAsOptions(oDocument, oContext, oOptions) Then
Dim strIniFile As String
strIniFile = "I:\INVENTOR\ILOGIC\TEMPLATE\DXFOut.ini"
' Create the name-value that specifies the ini file to use.
oOptions.Value("Export_Acad_IniFile") = strIniFile
End If

DOSSIER = ThisDoc.Path
POSITION1 = InStrRev(DOSSIER, "\") 
POSITION2 = Right(DOSSIER, Len(DOSSIER) - POSITION1)

'get DXF target folder path
oFolder = "I:\DOCUMENTS\ARTICLES\" & POSITION2 & "\"
oFileName = ThisDoc.FileName(False) 'without extension

'Check for the PDF folder and create it if it does not exist
If Not System.IO.Directory.Exists(oFolder) Then
    System.IO.Directory.CreateDirectory(oFolder)
End If

For i = 1 To 100
chiffre = i
myFile = oFolder & oFileName & "_Sheet_" & chiffre & ".dxf"
If(System.IO.File.Exists(myFile)) Then
Kill (myFile)
End If
Next i

'Set the destination file name
oDataMedium.FileName = oFolder & oFileName & ".dxf"
oFileName = ThisDoc.FileName(False) 'without extension

'Publish document.
DXFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)
'Launch the dxf file in whatever application Windows is set to open this document type with

myFile2 = oFolder & oFileName & "_Sheet_" & 100 & ".dxf"
If(System.IO.File.Exists(myFile2)) Then
Kill (myFile2)
End If

' Get the DWG translator Add-In.
Dim oDWGAddIn As TranslatorAddIn 
oDWGAddIn = ThisApplication.ApplicationAddIns.ItemById("{C24E3AC4-122E-11D5-8E91-0010B541CD80}")
' Check whether the translator has 'SaveCopyAs' options
If oDWGAddIn.HasSaveCopyAsOptions(oDocument, oContext, oOptions) Then
Dim strIniFile As String
strIniFile = "I:\INVENTOR\ILOGIC\TEMPLATE\DWGOut.ini"
' Create the name-value that specifies the ini file to use.
oOptions.Value("Export_Acad_IniFile") = strIniFile
End If

'get DXF target folder path
oFolder2 = "I:\DOCUMENTS\ARTICLES\" & POSITION2 & "\"
oFileName2 = ThisDoc.FileName(False) 'without extension

'Check for the PDF folder and create it if it does not exist
If Not System.IO.Directory.Exists(oFolder2) Then
    System.IO.Directory.CreateDirectory(oFolder2)
End If

For i = 1 To 100
chiffre2 = i
myFile2 = oFolder2 & oFileName2 & "_Sheet_" & chiffre2 & ".dwg"
If(System.IO.File.Exists(myFile2)) Then
Kill (myFile2)
End If
Next i

'Set the destination file name
oDataMedium.FileName = oFolder2 & oFileName2 & ".dwg"
oFileName2 = ThisDoc.FileName(False) 'without extension

'Publish document.
oDWGAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)
'Launch the dxf file in whatever application Windows is set to open this document type with

myFile2 = oFolder2 & oFileName2 & "_Sheet_" & 100 & ".dwg"
If(System.IO.File.Exists(myFile2)) Then
Kill (myFile2)
End If

question = MessageBox.Show("VEUX-TU OUVRIR AUTOCAD POUR PURGER TES DESSINS???", "OUVERTURE AUTOCAD???", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1)
MultiValue.SetValueOptions(True)
If question = vbYes Then
GoTo OUVERTURE
Else If question = vbNo Then
GoTo FIN
End If

OUVERTURE :
Dim acadExe = "‪‪C:\Program Files\Autodesk\AutoCAD 2026\acad.exe"

'MessageBox.Show("N'OUBLIE PAS DE SAUVER EN VERSION 2000, UNE FOIS TON DESSIN PURGER ET DE PURGER TOUTES TES PAGES", "ATTENTION",MessageBoxButtons.OK,MessageBoxIcon.Warning)
Process.Start(acadExe, oFolder2 & oFileName2 & "_Sheet_" & 1 & ".dwg")

FIN:

 

 

 

 

0 Likes
170 Views
16 Replies
Replies (16)
Message 2 of 17

bradeneuropeArthur
Mentor
Mentor

can you try this out:

I think if this works that it is not the acad.exe related but the drive "I" related.

It is better to use the server name instead of the drive letter name!

Dim acadExe = "‪‪C:\Program Files\Autodesk\AutoCAD 2026\acad.exe"

'MessageBox.Show("N'OUBLIE PAS DE SAUVER EN VERSION 2000, UNE FOIS TON DESSIN PURGER ET DE PURGER TOUTES TES PAGES", "ATTENTION",MessageBoxButtons.OK,MessageBoxIcon.Warning)
Process.Start(acadExe)

 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 17

SergeLachance
Participant
Participant

Thank for your reply 🙂

 

I have only change the acad.exe link

"‪‪C:\Program Files\Autodesk\AutoCAD 2026\acad.exe"

for what you talking about ''I'' ?

0 Likes
Message 4 of 17

bradeneuropeArthur
Mentor
Mentor

The code goes wrong on line 111

This is where you open acad with parameters to the I drive

 

bradeneuropeArthur_0-1758710174852.png

To eliminate that this is the case use my test code to have a look if the acad exe is the problem or the I drive.

Using the drive letter in code is not best practice. Using the server name is in this case better.

For example what if the server is not available?
This possibly is best to check.

 

So please test this first:

 

Dim acadExe = "‪‪C:\Program Files\Autodesk\AutoCAD 2026\acad.exe"

Process.Start(acadExe)

 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 5 of 17

SergeLachance
Participant
Participant

THANKS AGAIN FOR YOUR TIMES 🙂

 

i try it but dont work again 😞

 

SergeLachance_0-1758712585259.png

 

0 Likes
Message 6 of 17

bradeneuropeArthur
Mentor
Mentor

can you test with a new rule the following:

 

Process.Start(acad.exe)

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 7 of 17

bradeneuropeArthur
Mentor
Mentor

could this be the solution maybe:

 

https://forums.autodesk.com/t5/inventor-programming-forum/fail-to-use-process-start-in-inventor-2025...

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 8 of 17

SergeLachance
Participant
Participant

i have allready test it!

 

SergeLachance_1-1758713595055.png

i have remove my link to just try to open autocad, and i have reinstall autocad 2026 2 times!

without succes 😞

 

SergeLachance_0-1758713560373.png

 

0 Likes
Message 9 of 17

bradeneuropeArthur
Mentor
Mentor

maybe this is relevant for you too then:

 

https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/FATAL-ERROR-ASC-in...

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 10 of 17

SergeLachance
Participant
Participant

i have allready reinstall autocad 2026 and i dont use vault!

0 Likes
Message 11 of 17

bradeneuropeArthur
Mentor
Mentor

can you start via explorer:

C:\Program Files\Autodesk\AutoCAD 2026\acad.exe

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 12 of 17

SergeLachance
Participant
Participant

yes when i click on the icon acad.exe on my C: 

is starting and i looking the pproperties and the link is really C:\Program Files\Autodesk\AutoCAD 2026\acad.exe

0 Likes
Message 13 of 17

bradeneuropeArthur
Mentor
Mentor

And when you copy paste that string "C:\Program Files\Autodesk\AutoCAD 2026\acad.exe" in windows explorer?

 

bradeneuropeArthur_0-1758715387100.png

 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 14 of 17

SergeLachance
Participant
Participant

autocad open

0 Likes
Message 15 of 17

bradeneuropeArthur
Mentor
Mentor

then please try the next thing:

 

use a new code of i-logic

Process.Start("notepad.exe")

 does this start notepad?

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 16 of 17

SergeLachance
Participant
Participant

yes

 

0 Likes
Message 17 of 17

bradeneuropeArthur
Mentor
Mentor

@johnsonshiue do you have any ideas?

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes