Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - dirc

Pages: 1 2 3 [4]
Automation Interface, Add-Ins and Tools / COM Error not being thrown
« on: November 03, 2003, 05:11:30 am »
As you may well be aware, I am in the last stages of completing an Add-In for importing .NET assemblies.

This basically trawls through the assemblies and extracts namespaces and creates packages accordingly.

As each namespace is encountered, I test to see if the package already exists using the following code:
Code: [Select]

     testPackage = package.Packages.GetByName(packageName) as EA.Package;
catch (System.Runtime.InteropServices.COMException cex)
   //Package does not exist, so create new one
   newPackage = package.Packages.AddNew(packageName, "") as EA.Package;


// etc.......      
catch (Exception ex)
   //Other Error Handling ....

I am sure this worked earlier, maybe under V3.5, but now, I keep getting a message box with the following message:

Syntax error(missing operator) in query expression 'Name=myNameSpace' AND Package_ID in ()'

Does anyone have an idea as to what is happening? Am I dong something wrong? Otherwise, does anyone else have any ideas as to how to check for the pre-existence of a package?

Pages: 1 2 3 [4]