Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Automated Build Check

Status
Not open for further replies.

Joel79

Mechanical
Aug 21, 2019
12
I am looking for ways to add some automation to my team's workflow. At any given time there are multiple people working on multiple projects and they switch from project to project frequently. We use SVN as our config repo and it works well with the practices that we have. We are also using Jira and have access to automated build servers. These build servers are mainly used by our software team to run automated compile/build tests to ensure complete check-ins. I was wondering if there is something similar that we can do on SolidWorks models. Ideally, once someone checks in a SolidWorks file, the build server would update the repo and open the top-most assembly or assemblies in that project and log any build errors. These errors would be posted to the Jira ticket for correction. This would cut down on engineers checking in incomplete assemblies where the referenced models are stored locally and not checked in.

I'm not finding any clear way to automatically start SolidWorks and save off the list of build errors that you get when opening the model.
 
Replies continue below

Recommended for you

I don't know about anyone else, but I am not following your process very well, because first I don't know what SVN is?

The other thing is why do you want the build errors? If you are building the models correctly you shouldn't have any build errors. However, if you are talking about building design with multiple people working on it at the same time, are you using SW PDM STD or Premium? If so, then there are options you can set for the vault to inform the person that references that file that it has updated and askes him if he wants to see the latest file checked in.

If its a path issue then you need to have your users work within the vault. The SW PDM vault when you check out a file its a local copy, but it's saved in the vault all files need to be checked back into the vault to update the vault file. You should have a specific workflow for all your users to follow. If they don't then that's a management issue not resolved by software.

If am incorrect in what I assume you are talking about please elaborate in more detail

Regards,
Scott

Scott Baugh, CSWP [pc2]
CAD Systems Manager
Evapar

"If it's not broke, Don't fix it!"
faq731-376
 
Looks like JIRA is some sort of cloud workflow program. It looks like you are not using SW PDM in any way, is that accurate?

We have SW PDM Std and here is our workflow for all files in the vault. It can be PDF, Excel, JPG, not just SW files:
Workflow_hzjp8o.jpg


Scott Baugh, CSWP [pc2]
CAD Systems Manager
Evapar

"If it's not broke, Don't fix it!"
faq731-376
 
Thanks for the responses!

SVN is a configuration management server (like git). We don't use PDM because we want to use the same repo for all project files - software, gerber files, documentation, etc. Since SVN is just a file server and does not know about Solidworks model issues, I wanted to add some automatic checking on the server side that would generate error logs when assemblies are checked in with errors. Here is the workflow I had in mind:

-user checks in model to SVN with reference to Jira task
-SVN integrated file changes
-Build server runs a script that opens the model and logs errors (such as missing model references)
-Build server adds error log to Jira task

So - I'm really looking for a way to run Solidworks form the command line and extract any build errors.
 
This seems more like an API question since you are wanting to pull information about files. Maybe one of the API guru's can answer this because to my knowledge there is nothing built into SW that will allow you to access that info from the menus or a command.

Scott Baugh, CSWP [pc2]
CAD Systems Manager
Evapar

"If it's not broke, Don't fix it!"
faq731-376
 
Great feedback - looks like this should do the trick!
 
I think Fifi may have a bit of language barrier. GetWhatsWrongCount can't be used in the command line. You can specify a SolidWorks macro to run in the command line, and that macro can use GetWhatsWrongCount etc, but you can't do it straight from the command line.

 
Yes. I created a macro that utilizes the GetWhatsWrong Method. The macro reads the list of files from a local file and writes the result to another file. so the process ended up being:

Jenkins Build Server is triggered by SVN file check-in
Python script is run that parses Modified/added files from the commit
File is created with list of Assembly files to check
Solidworks is run with the macro that opens each file and records issues to file
Python script parses file and emails the person who authored the commit if any issue are found

Turned out to be pretty involved - but working well so far. I really appreciate the help here - such a great community.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor