What's new

set file properties through api, document number, revision

cdub

Member
set file properties through api, document number, revision

Has anyone found a way to set the other properties on the "general" tab with the API. I can set the part number, and the properties that are specific to the file, but I'd like to use the API to set the properties that are configuration specific.

Of course, the API help isn't helpful on this, but I can seem to find any clues to how to do this in the object model either.

I also find it a bit strange that these "other" properties aren't really mentioned anywhere in the regular Alibre help either. Were these an after thought or something???

Of course, any insight would be appreciated
 

WoodWorks

Alibre Super User


What are you trying to accomplish with your program? My use is to automate as much as possible to speed up my modeling.

For my uses, I am employing a hybrid solution of keystroke macros, augmented with short API programs. Each providing the portion of the solution in thier own realm. The macros do that the API can not, and the API provides information to the macros that can not be accomplished from the user interface.

In my case for Part Data, I can press a hot key and be prompted for my standard values that will be included in my BOM. All done in a couple of seconds. With an API program that will return the number of configurations in my model, I can now automate changing individual part data values through all the locked configurations.
 

cdub

Member
set api properties

I'm working on a program with a standalone interface that does several things. One thing I'd like to be able to do is collect information from the user and populate the properties of the component at run time.

It sounds like this can't be done through the API currently. That seems a bit odd.

What do you use for creating macros?
 

WoodWorks

Alibre Super User


I use Macro Express (http://www.macroexpress.com/) as it is one of the more powerful macro tools out there. There are free tools, but Macro Express is more comprehensive and under active development. For only $40 US, it is a good value. I would also recommend purchasing the Macro Express book as it is hard to do advanced macros from the rudimentary information in the Help files. I purchased the downloadable PDF version which is more affordable (but does not include videos). I also purchased the PGM functions Library, as it provides more functions for advanced programming.

Being a non-program-specific utility, you can use what you have learned to write macros for other programs than Alibre.

I have found examples on writing advanced dialog windows, dialogs for file/path browsing, and will be glad to share that information. I try to periodically update the downloads on my website concerning the macros I have written.

I am also working to create dialogs for users to specify the important information for models. I have found that a " hybrid" approach has been the most successful. Rather than trying to do everything with the API, I create a template model in Alibre, and use macros with callable API routines to automate the final product creation. Each approach has its limitations, but together I have had good success getting the project accomplished.

Specific to populating Part Data, I use dialog windows to allow me to quickly select my material type, and then the macro automatically populates the appropriate fields in the Part Data. I have also included an entry to insert a copyright notice every time I populate the part data.

I will be glad to help you get going with Macro Express, and we can create a thread for posting the information that will help others get started. No need to wait until Alibre includes macro capability, as it can be done now.
 
Top