Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

DBworks programming

Status
Not open for further replies.

blinncqui

Electrical
Sep 30, 2003
8
CA
Hi to everyone,

I am tryng to write a macro that will allow me to change the custom properties in all the parts of an assembly and also update the information in the DBWORKS database. The "ick" if I could say is that I wan't to automise all the operations. My question is does anyone now what file or function is call when I press the save button in solid works and the DBWORKS window apperas with all the info for DBworks ??? By knowing that I would like to DBworks to save the info without showing the box and asking the user to click OK.

I just would like to know if anyone know's if it's possible or has some input about my quesion

Thanks
 
Replies continue below

Recommended for you

Hi,

I don't really know "squat" about DBWorks but I have a decent background in Programming, SolidWorks, and PDM. So, I will take a shot at this one because I have some suggestions about where I would investigate.

First, one thing that you need to do is consult your DBWorks documentation regarding the software's API (Application Programming Interface - this allows for automation of DBWorks). That is if it has one (it may not), if it doesn't have an API then I'm sorry to say that I don't know how you could accomplish what you're trying to do. This is because without an API DBWorks functionality is only ever going to function in the manner that you're used to.

On the other hand if there is an Application Programming Interface, the API help is going to be the best place to figure out how to go about incorporating the "silent save" functionality into your macro. I would read through the sections pertaining to the save functions in DBWorks and what functions are available to you. Your macro is going to have to intercept the DBWorks "save" event. The thing that you're trying to prevent from happening is display of the DBWorks dialog so you're going to have to dig into your API documentation and see what calls are there relavent to that task. In SolidWorks this call is "SaveSilent" so perhaps you'll want to try looking at that.

I deal primarily in writing full blown applications that tie together multiple programs so I'm not fully aware of what's supported in SW macros. Having said that you're going to need to add a reference to the DBWorks type library in Visual Basic in order to automate this particular functionality. I know this might seem like a lot of work and without a doubt it is tedious but this would be the way to go about resolving this particular question.

Good Luck,
Chris Gervais
Sr. Mechanical Designer
Lytron Corp.
 
Thanks for reply, I did find a solution for my problem, even two. Dbworks doesn't have a savesilent like solidworks does but you have 2options that can use in the DBworks configuration :

- one is to call a specified script every time you save, so you kind of by-pass there on save function

- the other one is to make the save function to take the old values and save without asking any questions to the user... it's not the best approach but it was the easiest way I found to fix the problem

Thanks for the input

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top