Brian Ekins

February 2012

Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29      

« After Autodesk University | Main | Translating Files with the API »

January 13, 2009

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00e553fcbfc68834010536ce88fe970c

Listed below are links to weblogs that reference Removing VBA Document Projects From Inventor Files:

Comments

Rob Beckley

I need to delete some code from all our files, I tried your DeleteAutoMacros but it errors on 'oVBCodeModule As codeModule' saying User-defined type not defined

We only have one bit of code and it dose not work because of the ThisDocument. ref in 64bit windows.
___________________________________
Public Sub AutoSave()

Dim oCustomPropSet As PropertySet
Set oCustomPropSet = ThisDocument.PropertySets.Item("{D5CDD505-2E9C-101B-9397-08002B2CF9AE}")

' Create or update the property containing the Total Mass.
Dim strTotalMass As String
strTotalMass = Format(ThisDocument.ComponentDefinition.MassProperties.Mass, "###0.000")

On Error Resume Next
oCustomPropSet.Item("Total Mass").Value = strTotalMass
If Err Then
Err.Clear
Call oCustomPropSet.Add(strTotalMass, "Total Mass")
End If
On Error GoTo 0

End Sub
______________________

Not sure where its going wrong?

Wolfgang Seidel

After using DeleteVBA.exe all macros were deleted. We did this directly on a copy of the file store. The only problem that remains is that we get strange vault status in the Autodesk Vault:
E.g. some of the files have green staus flags that do not get white if you check out this file.
Does DeleteVBA.exe also influence the status flags? Do you know what to do about this problem?

Brian Ekins

You need to run the program from the Command window where you can specify additional options. In this case you need to specify the name of the Inventor file to remove the VBA project from.

To open a Command window you can use the "Run..." command in the Start menu and type in "cmd" as the command to run. This will open the command window. Change directory to wherever you downloaded the utility to (C:\Temp\VBARemove in the example below).

C:\Users\Ekins> cd C:\Temp\VBARemove

Run the utility specifying the filename.

C:\Temp\VBARemove> DeleteVBA.exe C:\Users\Ekins\Part1.ipt

Jayaram Raman

The command prompt utility comes with the following message:

A filename must be specified in the command line.

On clicking OK The command utility promptly disappears.

Anything I'm doing wrong?

Thanks

The comments to this entry are closed.

RSS Feed

  •  Subscribe

Survey