How to get value from Excel to Autocad?

How to get value from Excel to Autocad?

Anonymous
Not applicable
1,380 Views
2 Replies
Message 1 of 3

How to get value from Excel to Autocad?

Anonymous
Not applicable

Hi!

 

I need to export a large number of DWG files to version 2000. I would like to take the path from Excel and then run the rest of the rule. Can anyone have an idea how to solve it?

 

This is rule

 


Option Explicit
Sub Ch3_TestIfSaved()
Dim app As AcadApplication
Set app = ThisDrawing.Application
Dim Pan As Integer
Pan = InputBox("Ile wierszy?", "tak")
Dim i As Integer
i = 1


Do
Set dwg = app.Documents.Open("D:\Obszary Robocze\Instalacje Modułowe\Designs\Rysunek1.dwg")
Call app.ActiveDocument.SaveAs("D:\Obszary Robocze\Instalacje Modułowe\Designs\Rysunek1_2000.dwg", ac2000_dwg)
dwg.Close
i = i + 1
Loop Until i > PanNum

End Sub

 

0 Likes
1,381 Views
2 Replies
Replies (2)
Message 2 of 3

Ed__Jobe
Mentor
Mentor

For something this simple, I would just use ScriptPro, which can be downloaded from GitHub here: https://github.com/ADN-DevTech/ScriptPro-installer

 

Just create a *.scr and then create a new ScriptPro project, select the scr to run and then select the files to convert.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 3 of 3

Anonymous
Not applicable

Thank you for your answer. However, I chose the method in which it points to the path to the folder, and each .dwg file in the folder is then subject to the operation of writing to the version 2000.

0 Likes