Message 1 of 5
opening multiple files in ACAD and making changes

Not applicable
06-20-2006
08:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All,
Thank you for all your great suggestions.....They helped me.
Now I need some more of your expert suggestions.
I have this Array(named sFileArray) which stores the names of multiple files I select from a Dialog Box.Now I need to iterate through these files....i.e open each file & make modifications & then save them. I am not able to figure out how to do that.....
This is my code which I tried to write.....Please suggest correction to it.
Public Function OpenAcadInsert(ByRef sFileArray As Variant) As Boolean
Set objAcad = Application
Set objAcadDoc = objAcad.ActiveDocument
Set objAcadMs = objAcadDoc.ModelSpace
Dim i As Integer
Dim elem As Object
ThisDrawing.Application.Documents.Open (sFileArray)
For Each elem In ThisDrawing.ModelSpace
If Revision(Revnum, Date, DSN, CHK, APP, Revdes) = True Then 'function which is called to make changes to each open drawing
ThisDrawing.Close True
Else
ThisDrawing.Close False
End If
Next
OpenAcadInsert = mbool
End Function
Please help me with the code......
Thanks
Avantika
Thank you for all your great suggestions.....They helped me.
Now I need some more of your expert suggestions.
I have this Array(named sFileArray) which stores the names of multiple files I select from a Dialog Box.Now I need to iterate through these files....i.e open each file & make modifications & then save them. I am not able to figure out how to do that.....
This is my code which I tried to write.....Please suggest correction to it.
Public Function OpenAcadInsert(ByRef sFileArray As Variant) As Boolean
Set objAcad = Application
Set objAcadDoc = objAcad.ActiveDocument
Set objAcadMs = objAcadDoc.ModelSpace
Dim i As Integer
Dim elem As Object
ThisDrawing.Application.Documents.Open (sFileArray)
For Each elem In ThisDrawing.ModelSpace
If Revision(Revnum, Date, DSN, CHK, APP, Revdes) = True Then 'function which is called to make changes to each open drawing
ThisDrawing.Close True
Else
ThisDrawing.Close False
End If
Next
OpenAcadInsert = mbool
End Function
Please help me with the code......
Thanks
Avantika