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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

How Pro-program identifies suppressed components?

rrajendran-3
1-Visitor

How Pro-program identifies suppressed components?

When an assembly with suppressed components is pulled into a session, the suppressed components are not included in the session. Still pro-program identifies these suppressed components.

Could someone explain how?


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
14 REPLIES 14

Have you looked at the actual assembly (.asm.*) file? It contains references to the components of the assembly, which is why it is the "assembly" file. If you look at file, say, with a text editor (DON'T save it in any way, it will corrupt the file), you will see the names of the parts and other assemblies that comprise the assembly. Presumably, there is some sort of identifier in the file that indicates the given component is suppressed. So the assembly "knows" about the suppressed component, but since it doesn't need it, doesn't load it into session.

Assembly files containing this kind of information is a handy thing. You can use it to find out which ones have references to a particular part.

Hi Kenneth

Thanks for your reply.

When I open the assembly file in a text editor, say notepad, I can see only binary or encoded values except for few lines.

Is there any other way to view this information (the names of the parts and other assemblies that comprise the assembly)?

What needs explaining? Pro/Program is the text version of the underlying model structure. What do you want to do with this information?

Also - until recent versions PTC included a plain-text list of components in the assembly file, but more recent versions encrypt the entire thing. If you could get a file created before revision 18 or so you would be able to read the entire file with Notepad, but PTC didn't like Solidworks poaching their data and took to encrypting parts of the files, eventually encrypting the entire contents.

The names of the components are still stored in the compressed file as plain text. It's an aspect of the file that I exploit to do a "where used" search for parts.

Not in Creo 2 assemblies. They do show up in Creo 2 drawings. Perhaps there is a setting that is controlling this behavior, but I don't have access to multiple versions of Pro/E and Creo to find out.

I just created an assembly yesterday in Creo 2, M200. The file for the most part is compressed, but as I said, the names of the components are most definitely in plain text. It's mixed in with a lot of compressed stuff, but they are there. There is also a section at the beginning of the file that is what I would call a "header", listing stuff about the operating system, version of Creo, etc.

To the best of my knowledge, there aren't any special settings that cause this behavior. I took a look at my config.pro and don't see anything pertinent.

There's a control for compressing output files that will prevent seeing the components in the assembly.

compress_output_files

yes*, no

specifies whether to store object files in a compressed format. compressed files are fully compatible across systems. they are slower to read and write, and have a smaller file size. however, in some cases the compressed file size is larger than the uncompressed format.

I just checked my options (all of them not just those in my config.pro), and compress_output_files is set to "no". Which, according to the last list of configuration options I downloaded from PTC, is the default. I think we noticed the "larger compressed size" thing back ages ago and opted to leave the files uncompressed. Besides, I think the compression is just an additional bit of processing done to files. The inherent binary format of the files is rather compressed as it is - thus the sometimes swelling of file size when another compression algorithm is applied to the data.

Given the useful nature of having uncompressed files, we're not likely to ever compress them.

Hi Rekha...

Maybe I am completely misunderstanding the issue here. Are you trying to see which components are suppressed in the assembly without actually opening the file? Is this why looking at the .asm file and trying to find the text strings related to assembly members is being investigated?

There are several ways to get this information from within Creo obviously... Model Tree filters, dumping the design from Pro/PROGRAM and parsing it for data, etc. You might also be able to pull this data using Web.Link or other tools programming tools. David's completely correct, too... once upon a time this was much easier. It's still not impossible - but you have to parse through the binary file for clear text names. There's a utility available on the PTC/User website for retrieving corrupt files from a Windchill workspace which makes use of such parsing.

Maybe if we knew what you were trying to accomplish, this might help us provide an answer? Do you just want a list... or do you want to do something with the suppressed items?

Thanks!

-Brian

I think the original inquiry was just a "how does it know" type of question. The subsequent discussion was rather tangential.

Rekha must have figured it out or gotten bored.

Nope, I haven't figured it out yet. I was working on something else.

First of all, thank you all for your inputs.

We use Creo 3.0 M050, maybe that's why the contents are fully encrypted.

To answer Brian, what I'm trying to accomplish is retrieve the suppressed components into session in my custom program. I actually wanted know how pro-program identifies the suppressed components, so that I can use the same/similar logic in my program to retrieve the suppressed components into the session.

But as David mentioned, if Pro-program is just the text version of underlying model-structure then I'm not sure if knowing about it will help me figure out a solution.

I might be missing something here, but I think Brian was asking if you have the assembly in session.  Pro/Program depends on this, as does the Model Tree and the various other bits of functionality that understand suppressed components.  If that's the case, I believe it is reasonably straightforward with the programmatic APIs (which I presume you are employing by the use of the Customization forum and the phrase 'custom program').  But if that's the case, why are we talking about the internal structure of the file on disk?

Getting a proper answer on what components will be suppressed if an assembly is retrieved without retrieving it is something of a nightmare.  One nasty case would be if a parameter was changed by Windchill since the last time the assembly was retrieved, and this parameter drives a program that suppresses and resumes components to produce the specified variation.

If it is indeed a case that the assembly is in session, and you're working with programmatic APIs, I think we can get the problem solved.  If it isn't, could you please clarify what situation you are working with?

The status is extractable from the model tree by including the status as a tree column and selecting to show suppressed items. The tree can be saved to a text file and parsed to get a list of the files that are currently suppressed.

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags