Community
Navisworks Forum
Welcome to Autodesk’s Navisworks Forums. Share your knowledge, ask questions, and explore popular Navisworks topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

changing part color in Navisworks by Excel

11 REPLIES 11
SOLVED
Reply
Message 1 of 12
AERE
8031 Views, 11 Replies

changing part color in Navisworks by Excel

Hello everyone,

I would greatly appreciate any suggestion on the following topic:

My parts in Navisworks are linked to custom-made Excel files. Could it be possible to change color of any given part by changing it's linked Excel file? - For example, in Excel, I report that the part is out of service and I want that part to automatically turn red in Navisworks?

Thank you.

11 REPLIES 11
Message 2 of 12
Patrick_Aps_9121
in reply to: AERE

What 3D CAD format do you generate from the Excel ?

you schould be able then to determine the colour in that CAD file

and so it will show up in Navisworks with that colour.

 

Or is this a bit too simple ?

Message 3 of 12
john.lipp
in reply to: AERE

Hi sergueiv

Are you using DataTools to link to the excel file to pull property information?  If that this is the case, you could use the appearance profiler to create profiles based off the values for that property, and then run the profiler tool when you receive updates.

If you are using hyperlinks, how are the links set up.  Is there an excel file specifically for parts that are out of service that those items in the model link to that excel file?  If that is the case, you could possibly use the Hyperlink/URL as the Category/Property in the appearance profiler to create profiles as well.

Best regards,



John Lipp
Support Specialist
Product Support
Autodesk, Inc.

Message 4 of 12
AERE
in reply to: john.lipp

Good afternoon John,

I greatly appreciate your help!

I am sure that's the way to go; what you suggested.

One thing: I cannot find any good tutorial for setting the Appearance Profiler for parts of my model. I mean, step-by-step - how to? - I am new to Navisworks (evaluating the package/influencing purchasing for my company's purposes). Please help if you could...

 

Best regards,

Serguei

Tags (1)
Message 5 of 12
AERE
in reply to: AERE

P.S.

John,

I am looking for setting an initial appearance profile for my part(s)" by category", not" by set".

Thank you.

Message 6 of 12
AERE
in reply to: AERE

John,

Please see attached files. My objective is, to be able to open the Excel "blocks" file, change the value of the B2 cell (to "yellow", "red", etc.) and see the change of the linked part's color in Navisworks accordingly.

Thank you very much for your help.

 

Best regards,

Serguei

Tags (1)
Message 7 of 12
john.lipp
in reply to: AERE

Hi sergueiv,

 
Unfortunately the XLS file seems to not have uploaded correct as I recieve an error that it is in a different format when attempting to open it in excel.

Could you zip it to an archive file and upload it again?


Best regards,



John Lipp
Support Specialist
Product Support
Autodesk, Inc.

Message 8 of 12
AERE
in reply to: AERE

Hi John,

To outline my objective in full scope...

Attached please find zipped archive containing the blocks.nwf file accompanied by source files generated by different 3D modelers - 3DAutoCAD'2012, Autodesk Inventor'2012 and Pro/Engineer Wildfire 5.0. The fourth part was converted to a neutral format (.sat) before it was opened in Navisworks. This example simulates a real life situation I certainly will deal with in a process of developing Navisworks models. Only four formats were introduced in this study but eventually, incorporating parts from wide variety of different sources (Catia, Solidworks, etc.) will occur. Working models will consist of thousands of components. Differences between properties of parts are obvious.

I need to accomplish the following:

 

Every part will be linked to a database which will be constantly updated; in this study, an EXCEL-based database. Any change of data in EXCEL, for example, record of a part failure, should automatically change corresponding part's color in Navisworks (from original to red, for example).

If you could, in Navisworks, please create a link between any part to a generic EXCEL file with only one cell, value of which, ever changed, will alter the corresponding part's color. The cell value could be of any type - text, numeric, etc.

 

At this time, I presume that engaging the Appearance Profiler tool along with "by set" approach might be the way to go considering the fact that in this scenario, differences in properties of components (parts) are not a factor to be concerned of (not sure though...)

Navisworks, so far, is the winner considering all great features it offers. Possibility of creating a working database link will seal my positive influence in decision-making towards purchasing of the software package.

 

Thank you very much John,

Serguei

Tags (1)
Message 9 of 12
john.lipp
in reply to: AERE

Dear sergueiv,

You need to setup the Excel file to link to a unique identifier for the item in the model.   Checking the models, the PREENGINEER and Invertor models have a Project/Part Number Category/Property pair, AutoCAD has Entity Handle/Value, and the SAT file doesn’t have a unique identifier, but you can create your own User Defined property in Navisworks and add one yourself.

I created an XLS file that has a column “NWUniqueID” for the ID and a column “Color” for the color.   In the example I created, the color will either be RED or BLUE.

DataTools links the elements by ID to pull the color information from the excel file as a property for the item. 
For example, to link the Entity Handle in the AutoCAD DWG to the column in the excel file, the SQL query is as follows:

SELECT * FROM [TblShapesData$] WHERE "NWUniqueID" = %prop("Entity Handle","Value")

This will use the TblShapesData sheet in the excel file and match the Navisworks Category/Property pair for Entity Handle/Value to the column “NWUniqueID” in the sheet.

The DataTools link name is COLORS_AutoCAD, so once active, this will create a Category/Property pair COLORS_AutoCAD/Color that pulls the color property from the Excel file.

The other links are as follows:

COLORS_proengineer

SELECT * FROM [TblColorsData$] WHERE "NWUniqueID" = %prop("Project","Part Number")

 

COLORS_INVENTOR

SELECT * FROM [TblColorsData$] WHERE "NWUniqueID" = %prop("Project","Part Number")

 

COLORS_User Data

SELECT * FROM [TblColorsData$] WHERE "NWUniqueID" = %prop("User Data","ID")

Since the different formats have IDs that come from different Category/Properties, individual datatools links are required.

Now that the links are setup, you can create the profiles in the Appearance Profiler to select by Category the Category/Property pairs from the datatools links.   So for example, to create a profile for all items that have their colors set to RED in the COLORS_AutoCAD datatools link, you create a profile:

Category: COLORS_AutoCAD
Property: Color
equals: RED

Then repeat for blue:

Category: COLORS_AutoCAD

Property: Color

equals: BLUE

Then repeat for the other datatools links changing the Category for COLORS_proengineer, COLORS_INVENTOR, and COLORS_User Data.

Then after the profiles are set up, you can click Run in the appearance profiler, and the colors will change according to color properties that are being pulled from the excel file.

I’ve attached the Excel file, Appearance Profiles dat file to import, and the NWF with the datatools links setup.  If you drop the three files in the folder with your models, open the NWF, import the .DAT file into the appearance profiler tool and run it, it should change the items in the models to either red or blue based off of the colors specified in the excel file.

This example has colors specified in the excel file, but you could use some other property in the database such as “Out of Service” column with a value of either yes or no and create an appearance profile that checks if that property is yes, and if so, set the color of those items red.

With the appearance profiler, you need to actively run the appearance profiler to set the colors if the excel file is updated.  If you wanted more automation, then you may wish to look into the Navisworks API.

Please let me know if you run into any issues or if this answers your question.

More information on DataTools can be found here:
 - http://docs.autodesk.com/NAVMAN/10.0/ENU/Autodesk%20Navisworks%20Manage%202013%20Online%20Help/files...

More informaton no the appearance profiler can be found here:

 - http://docs.autodesk.com/NAVMAN/10.0/ENU/Autodesk%20Navisworks%20Manage%202013%20Online%20Help/files...


Best regards



John Lipp
Support Specialist
Product Support
Autodesk, Inc.

Message 10 of 12
AERE
in reply to: AERE

Hi John,

It took me quite a lot of time to fully understand the algorythm behind the entire flow but it worked perfectly fine...

Your expertise is superb and your help is precious! I greatly appreciate your involvement with my research.

 

Thank you very much and best regards,

Serguei

Message 11 of 12
esa.poyhonen
in reply to: john.lipp

Thank you for the specific guidance to link excel in Navisworks objects.

 

I have managed to create links and so far I have linked 7 objects. Still 20 links to create.

 

I am having a trouble run the appearance profiler for those 7 objects. Navisworks crashes after 10 min in that process.

 

There is a picture from the situation. How can I make this process lighter so that I can link those remaining 20 objects?

 

Appearance profiler.jpg

Data comes from excel file for every object individually. So there are 27 excel files as there are 27 objects.

 

Help is appreciated.

Message 12 of 12
sulis120471
in reply to: john.lipp

Hi Jhon

 

Great Solution...

 

I follow your procedure ...

1.I created an XLS file that has a column “NWUniqueID” for the ID and a column “Color” for the color.   In the example I created, the color will either be RED or BLUE. (ok)

2. link excel with naviswork with SQL string  :SELECT * FROM [TblShapesData$] WHERE "NWUniqueID" = %prop("Entity Handle","Value") ( no work)

but when I change to SELECT * FROM [TblShapesData$] WHERE "NWUniqueID" = %prop("Item","Name") its work. can not link on properties navis "entity handle" please suggest

 

best regards

 

thks in advance

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report