cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Projected Areas for multiple views into excel

Aaronm87
14-Alexandrite

Projected Areas for multiple views into excel

I am trying to find a way to take a model (part or assembly) and use datums to orient the model based off a list of angles to get the projected (frontal) area and then save or export those values as a list. Is there a way of doing this? I have several hundred orientations to perform so I would need a way to automate.

5 REPLIES 5


@Aaronm87 wrote:

I am trying to find a way to take a model (part or assembly) and use datums to orient the model based off a list of angles to get the projected (frontal) area and then save or export those values as a list. Is there a way of doing this? I have several hundred orientations to perform so I would need a way to automate.


Hi,

there are many things that can be done ...
But first, you need to be able to do one measurement manually in Creo and to be able to accurately describe this procedure in this discussion. Test data must also be provided.


Martin Hanák

Interesting problem for a Sunday evening. 🙂

 

I setup an assembly that had a surface for the shadow analysis in it.  Then placed a offset CSYS from that and set some parameters to drive the X, Y, X angles for it.

 

Then I assembled my model to the offset CSYS in the assembly and setup the shadow analysis (saving the analysis). (make sure the surface is big enough to capture the results).

2022-01-09 at 10.02 PM.png

Once that was setup - I recorded a mapkey to open up the saved shadow analysis and export the data to a text file in a sub-directory. (more on that in a sec).

 

THEN -- I used Nitro-CELL... (you can download and use it for free with the link) -- including the workbook and models for you to look at and run if you want a closer look.

I used Nitro-CELL to setup a "batch" process for all the rotations I was interested in. 

2022-01-09 at 10.01 PM.png

 

The batch sheet will loop through each variation and force another worksheet to execute with the operations (genShadow):

2022-01-09 at 10.04 PM.png

As you can see - this sets the rotation parameters values for the assembly offset CSYS (as defined by the active running batch item - excel formula referenced the values) - then regenerates the model.

 

Then it fixes the mapkey I added into excel to update the file name for the data export (row number in the batch sheet) - and then executes the mapkey to extract the shadow data to a named text file within in a sub-directory (ShadowDataFiles) 

2022-01-09 at 10.19 PM.png

 

Then I used Excel Power Query to import all the shadow data files in the sub-directory in one call, then transformed them with Power Query into the final results that are written back to an Excel Worksheet - "finalImportedShadowFiles":

2022-01-09 at 10.08 PM.png

 

Setting up the Excel Power Query read of files is not hard - but the directory name in the file may be different than the file I am including -- so be aware of that if you are not seeing it update.

 

Once the automation is finished batching - as a final step in the automation, the "startProcess" worksheet "REFRESHES" ALL of the data connections in Excel so that Power Query imports all the latest fies, merges them and reports them as a table back to the "finalImportedShadowFiles" Worksheet.  (kind of a workflow automation in Excel that is standard functionality).

 

With just a big bit more work, you could merge the shadow data with the batch data and get a super clean report of all your areas and ratios.

 

Attached is the reference file for you to check out.  Hope this helpful and inspirational.  It was created in Creo 6.

 

Dave

Aaronm87
14-Alexandrite
(To:DavidBigelow)

Thanks, that's a nice write up! I will definitely give that a try. Always nice to too different solutions 🙂

 

I found another method this weekend as well. Takes a bit longer to get results because of the verify process on the family table but here is what I used:

-Mate the model in an assembly using the constraints as angles in the family table

-Calculate the area of the model and project to a plane

-Add measurement as feature to model tree

-Create family table, add dimensions and feature as columns

-Add all values to table leaving the projected area blank

-Verify results (takes some some)

-Project area data is now calculated


@Aaronm87 wrote:

Thanks, that's a nice write up! I will definitely give that a try. Always nice to too different solutions 🙂

 

I found another method this weekend as well. Takes a bit longer to get results because of the verify process on the family table but here is what I used:

-Mate the model in an assembly using the constraints as angles in the family table

-Calculate the area of the model and project to a plane

-Add measurement as feature to model tree

-Create family table, add dimensions and feature as columns

-Add all values to table leaving the projected area blank

-Verify results (takes some some)

-Project area data is now calculated


Hi,

your solution is the best one.

Nitro-CELL is certainly excellent, but the free version has significant restrictions on the number of operations. It is therefore possible that you will not even be able to try the proposed solution.


Martin Hanák

Just for clarification.

 

There are multiple options to automate this.  

 

The point is that once you figure out a workflow that works, you have multiple options to automate it.   My preference is Nitro-CELL - less code, leverage the Power of Excel for Power Query gets the results into desired format/results quickly.

 

You could also use CREOSON and follow the same principles (CREOPYSON and openpyxl would be powerful) for this purpose.  Costs nothing, same benefits.

 

Nitro-CELL is limited on the number of operations with the FREE version - useful for most small automation projects.

 

If you are bumping into the limit on your testing - simply request a DEMO - and you get all functionality for a period.  Optionally, you can purchase a full license for a month on-line and get your work done if it is working.

 

Happy automation!

 

Dave

 

 

Announcements


Top Tags