Hey,
I'm pretty new to this API stuff (Just started last week) and I've been trying to update an API so it does the following:
1. If I run the macro when a Part or Assembly is open, it will bring up a window that promps the user to input a set of data (ie, project, finish, vendor, etc.)
2. If I run the macro when a Drawing is open, it will bring up a different window that propmps the user for different data (ie, Checker, Manufacturing Approval, etc.)
So far, I have it working perfectly for Parts and Assemblies. But when I run it with a Drawing open, I get "Run-time Error '91': Object variable or With block variable not set" and it hangs up on this line: Prop = CurrentDoc.AddCustomInfo3(CurrentDoc.IGetActiveConfiguration.name, PropName(0), swCustomInfoText, " ")
I have double checked all my parameters and cannot seem to find one that is not set. Does anyone know what's wrong?
Current API attached.
Thanks,
Tara
SolidworksApi macros
