Posts Tagged ‘file properties’

Assembly Visualization – the search for the missing file properties

Tuesday, January 17th, 2012

Releasing your drawings to the machine shop with missing information makes a machinist angrier than a baby boomer looking at a teenager that doesn’t have his pants pulled up all the way.

As we all know, looking through a large assembly, checking file properties can be a tedious task. (At least that is the excuse I always use.) I’ve found Assembly Visualization can be a great tool to quickly skim through your assembly’s components looking for missing information.

Here’s how I could use it to find any parts in my assembly without material specified:

1. Start the Visualization tool (it is either on your assembly or evaluate toolbar by default)

2. Right mouse button click on any of the headers (except “File Name”) and choose “Add Column”, or find any column with a little black arrow pointing to the right.AddColumn

3. Click on that arrow and choose “More…”

more

4. Choose the property you want to examine. (Check it out, you could work with formula too!)

Property

5. Now you can sort by this property by clicking on its heading and your parts with missing information will come to the top. You can quickly see I haven’t assigned a material to my “crank-knob”missing

Thank you for attending “Jeff Sweeney’s SolidWorks tip of the randomly selected interval” please tune in next time, at a time to be determined when I feel like it, to learn more cool SolidWorks tips and tricks.

Jeff Sweeney

Jeff Sweeney, CSWE
Engineering Data Specialist
3DVision Technologies

DSOFile beaten by SolidWorks Document Manager

Monday, January 9th, 2012

Hey macro lovers! Have to change a lot of SolidWorks file properties, but don’t want to your code to have to open each file one at a time?

Most web searches are going to point you to use Microsoft’s DSOFile. It’s a good solution, but using it means you need to install it on your client machines (and watch out there is a 32 and 64 bit version out there!) or create a release package. Neither option is very fun if you are just writing a quick SolidWorks macro.

Luckily, the SolidWorks Document Manager is a great option. It gives you write access to many properties inside of a SolidWorks file.

Add “SwDocumentMgr 20XX Type Library” to the list of your macro’s references and your wish is the Document Manager’s command.

refs

IMHO, the documentation is a very “tedious” so here is a little VBA snippet showing how easy this COM object is. This snippet will add the custom property “Material” to the file and assign it the value “Adamantium”:

Dim swDoc As SwDMDocument12
Dim swDM As SwDMApplication
Dim mOpenErrors As SwDmDocumentOpenError
Dim objClassfac As SwDMClassFactory
Set objClassfac = CreateObject("SwDocumentMgr.SwDMClassFactory")
Set swDM = objClassfac.GetApplication(<This is a string/key that you need to request from SolidWorks>)
Set swDoc = swDM.GetDocument(strDocFileName, SwDmDocumentType.swDmDocumentPart, False, mOpenErrors)
swDoc.AddCustomProperty "Material", SwDmCustomInfoType.swDmCustomInfoText, "Adamantium"
swDoc.Save
swDoc.CloseDoc

Just as easy as DSOFile, and more powerful -if you are wanting to update configuration specific properties, DSOFile is going to let you down.

DSOFile is still the best tool for working with file properties of other OLE type (read: Office) documents but when it comes to SolidWorks documents, all the cool kids are using the SolidWorks Document Manager.

By the way, if you are looking for a way to impress your date, read more about the Document Manager. It gives you more control over your SolidWorks files than just messing with file properties. With it you can write applications that emulate file management tools to perform such tasks as renaming, replacing, and copying SolidWorks documents -you don’t even have to have SolidWorks installed!

Jeff Sweeney

Jeff Sweeney
Engineering Data Specialist
3DVision Technologies

Property Tab Builder

Wednesday, September 16th, 2009

File properties. I’ve been singing their praises ever since I was a little Engineering Data Specialist Man. A few days ago when I was visiting a customer I noticed they were still using this interface to populate their file properties:

props

I asked if they were still rubbing two sticks together to make fire. That interface is so last year, yet after taking an informal survey I learned many are still using it! Do yourself a favor and look up the  “Property Tab Builder” in the help file. It will help you build an interface that looks something like this:

propertytab

Much nicer?! Checkboxes, radio buttons, drop lists all to make this boring data entry easier. It’s very easy to set up, you certainly will get a ROI after using it a few times. To help get you started, the file I used to create this custom tab is located here.

Jeff Sweeney

Jeff Sweeney
Engineering Data Specialist
3DVision Technologies

“BULK” adding NEW Properties to EXISTING files

Friday, December 5th, 2008

I was at a customer in Lima, Ohio yesterday, and they were still in the “implementation stages” of SolidWorks (setting up templates, BOMs, File Properties, etc.), but at the same time they also had users creating parts and drawings (for the past few weeks). They came up with a “new” custom property that they wanted to include in thier Part template, so we just added it to the template. GREAT for NEW parts, but what about all the EXISTING files!?!? Adding this property MANUALLY would take FOREVER !!

Thank goodness there is a TASK in TASK SCHEDULER called UPDATE CUSTOM PROPERTIES !!

(Start— All Programs—SolidWorks2009—SolidWorks2009SPXX—SolidWorks Tools—SolidWorks Task Scheduler)

ONE of the things it will let you do is ADD a NEW property to a whole DIRECTORY (or selection) of files all in ONE SHOT !!

AWESOME !

Randy Simmons

Randy Simmons
Application Engineer, CSWP
3DVision Technologies

eDrawings is getting smarter

Friday, May 23rd, 2008

[...or should that be "eDrawings are getting smarter"?]

You can think of a SolidWorks file as having two parts. The video data – what the file looked like the last time it was saved, and the mathematical data.

Basically eDrawings reads the video data only. This is great on one hand because it is cheap and fast, but on the other hand your users need to be aware that the file they are looking at may not be the “latest-and-greatest”. You can be assured you are looking at what that file looked like on the last save; but if the file has any references that have changed since the save, you might be in trouble.

Back in the old eDrawings 2007 days, drawings had a double whammy because often times they would have titleblock information linked to file properties…and since many people/PDMs update the file properties without opening the file [especially workflows in PDMWorks Enterprise] –you were pretty much guaranteed that the valuable titleblock information would view/print incorrectly when using eDrawings.

Good news though, in the SolidWorks 2008 format, eDrawings 2008 will now correctly display notes linked to file properties! Special note though…only notes linked to the document properties ($PRP:) display correctly. If you are linking notes to the referenced file ($PRPSHEET:) they still do not display with the new value.

I would love to know if changing a file property updates the file video data in the SolidWorks file or if somehow eDrawings is learning how to display more than just the video information. If it is the latter, that could be a sign of good things to come? [Cross fingers]

Jeff Sweeney

Jeff Sweeney
Engineering Data Specialist
3DVision Technologies

WordPress SEO fine-tune by Meta SEO Pack from Poradnik Webmastera