×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Automated Build Check

Automated Build Check

Automated Build Check

(OP)
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.

RE: Automated Build Check

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

www.evapar.com

Quote:

"If it's not broke, Don't fix it!"
FAQ731-376: Eng-Tips.com Forum Policies

RE: Automated Build Check

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:

Scott Baugh, CSWP pc2
CAD Systems Manager
Evapar

www.evapar.com

Quote:

"If it's not broke, Don't fix it!"
FAQ731-376: Eng-Tips.com Forum Policies

RE: Automated Build Check

(OP)
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.

RE: Automated Build Check

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

www.evapar.com

Quote:

"If it's not broke, Don't fix it!"
FAQ731-376: Eng-Tips.com Forum Policies

RE: Automated Build Check

Hello,
You can use GetWhatsWrongCount Method to get the number of build errors.
And GetWhatsWrong Method to get details on each error.
Those methods can be used in a third party command line application, but Solidworks need to be installed to open the document.

RE: Automated Build Check

(OP)
Great feedback - looks like this should do the trick!

RE: Automated Build Check

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.

RE: Automated Build Check

(OP)
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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

White Paper - PLM and ERP: Their Respective Roles in Modern Manufacturing
Leading manufacturers are aligning their people, processes, and tools from initial product ideation through to field service. They do so by providing access to product and enterprise data in the context of each person’s domain expertise. However, it can be complicated and costly to unite engineering with the factory and supply chain. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close