Jump to content

how to convert my exe file to Autocad dll


jnky

Recommended Posts

G'day, I have an application which removes the read only attribute from a folder and all its sub-folders and files.

I access this application with the startapp command in Civil3D via the acaddoc.lsp.

 

All is working and why would I want to re-invent the wheel I ask myself.

Well the thing is I have been dabbling in VB.net on a basic level outside of Autodesk products for some time now and think I now need to learn how to integrate.

 

I believe the code below could be converted to DLL and accessed through the netload command but my attempts to date havent worked and Im looking for advice....thanks in advance for your help.

 

Imports System.IO

Module Module1

   Dim C3DFolder As String = "c:\C3D"

   Sub Main()
       REMReadOnly(C3DFolder)

   End Sub

   Sub REMReadOnly(ByVal folder As String)

       If (System.IO.Directory.Exists(C3DFolder)) Then

           For Each filename As String In My.Computer.FileSystem.GetFiles(folder)
               System.IO.File.SetAttributes(filename, IO.FileAttributes.Normal)
           Next

           For Each foldername As String In My.Computer.FileSystem.GetDirectories(folder)
               REMReadOnly(foldername)
           Next

       End If
   End Sub


End Module

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...