Erick's Blog
  • Home
  • Blog
  • Apps
    • Mortgage Calculator
  • PowerShell
    • Blog & Examples
    • Excel Reference
  • Windchill
    • Document Exporter
    • Document Worker
    • E.P.L.E.S.
    • Export Released
    • Property Checker
    • Windchill Business Analytics >
      • Part 01 - Program Logic
      • Part 02 - Getting Data with SQL Queries
      • Part 03 - Automating SQL Queries
      • Part 04 - Converting SQL Results to XML
      • Part 05 - Data Processing and Manipulation
      • Part 06 - Displaying XML in HTML
      • Part 07 - Auto Updating Displayed Data
      • Part 08 - Hosting Webpage with an Existing Apache Installation
      • Part 09 - Running Multiple Queries In Sequence
      • Part 10 - Calculating Data Trends
      • Part 11 - Making It Modular
    • Windchill Quick View
  • Reviews
  • Music
  • Contact

Creo 4.0 and PowerShell - Part 4: Exporting Family Table Instances to Stand-Alone Files

7/7/2017

0 Comments

 
Picture
Welcome back everybody!

It has been quite some time since I last posted some Creo 4.0 with PowerShell magic and I had the craving to invest more time into it.  Today, I would like to introduce you to a PowerShell function that can be used to automate the exporting of family table instances to stand-alone files.
Why do you need this?  I have encountered a lot of customers who either use family tables correctly and don't like them or don't use them correctly and hate them.  There was and is an obvious need to allow people to quickly "unzip" family tables into their individual instances.

Is this really all I need?  No.  All this function does is export the instances to individual files.  You still need to point your assemblies to reference those newly exported files.  Maybe I will show you how to do this in another section but I encourage you to try to figure out the other 50% yourself.  If you keep waiting for someone to do it for you, you will never learn.

How do I use this function?  In Part 1, I showed you how to get things setup.  In Part 3, I showed you how to iterate models through a loop.  You simply need to put the below function in your scripts (that I am sure YOU made YOUR OWN by now) and push your files through the function.

Anything I should look out for?  Like my other scripts, there isn't any error checking.  There also isn't anything that prevents newly saved instances from overwriting existing saved instances that have the same name.  I'm not going to give everything away!  I suggest you add these critical pieces to your own code.  This is basic stuff that PowerShell users should be able to handle.  Other than that, read the comments in the code below for more details.

Important!  When pushing assembly based family tables through the function, all parts and subassemblies will be copied to the export path.  You need to build in a check to make sure you aren't overwriting any files that are already there.  This will also export the family table of any subcomponents rather than just the instance so your export path will have family table files as a result.
Family Table Instance Export Function

    
0 Comments



Leave a Reply.

    Author

    PLM engineer while "on the clock", programmer, designer, dreamer all other times.

    Archives

    July 2017
    May 2017
    February 2017
    January 2017
    December 2016
    August 2016
    July 2016
    June 2016
    May 2016
    April 2016
    March 2016

    Categories

    All
    ASP.NET
    Batch Script
    C#
    Career
    Computers
    Creo
    Creo API
    Flash
    GameMaker
    GitHub
    Home Loan
    How To
    HTML5
    Java
    JavaScript
    MAME
    Mortgage
    Music
    .NET Core
    Office
    PC Games
    PfSense
    PowerShell
    Reviews
    Robot
    SQL
    Video Games
    Web App
    Windchill
    Windchill API

    RSS Feed

Copyright © 2018 Erick Johnson
  • Home
  • Blog
  • Apps
    • Mortgage Calculator
  • PowerShell
    • Blog & Examples
    • Excel Reference
  • Windchill
    • Document Exporter
    • Document Worker
    • E.P.L.E.S.
    • Export Released
    • Property Checker
    • Windchill Business Analytics >
      • Part 01 - Program Logic
      • Part 02 - Getting Data with SQL Queries
      • Part 03 - Automating SQL Queries
      • Part 04 - Converting SQL Results to XML
      • Part 05 - Data Processing and Manipulation
      • Part 06 - Displaying XML in HTML
      • Part 07 - Auto Updating Displayed Data
      • Part 08 - Hosting Webpage with an Existing Apache Installation
      • Part 09 - Running Multiple Queries In Sequence
      • Part 10 - Calculating Data Trends
      • Part 11 - Making It Modular
    • Windchill Quick View
  • Reviews
  • Music
  • Contact