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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Create Annotiation Sets & Groups programmatically

Spiff
6-Contributor

Create Annotiation Sets & Groups programmatically

Hi there,

 

I am searching for a way to programmatically create Annotation Sets & Groups for Creo View. The reason is that I want to analyze different assemblies in the same style like coloring parts by IDs due to different functions or states of the parts. The groups are needed for hiding those different functions within an Annotation Set.

 

I analyzed a .pvz file which contains several Annotation Sets & Groups. After unzipping it, I found that

  • each Annotation Set is stored in an .ast file
  • each Group is stored in a .grp file
  • a list of both is stored in the .etb file

 

.ast (Annotation Sets)

is somehow a mixture of encoded and ASCII format. It lists up the Part ID Paths of the components in the pvz/pvs-file.

In the header you can find a string !/EMK V7.0 !/ surrounded by the contact and info data you set while creating the Annotation Set within Creo View. Maybe this is a hint of how the file is encoded? I could not find anything about it.

 

.grp (Groups)

is the same like .ast but does not have any ASCII information besides the !/EMK V7.0 !/ string and the name of the group.

 

Both file types (.ast and .grp) seem to have an embedded file with the same name but without a file extension. This file can also just be unzipped.

They are again a mixture of encoded stuff and ASCII.

 

.ast (Annotation Sets) embedded file

The only plain ASCII text I can read here are the <light_data> and <dynamic_interference_data> containers.

In the upper part there are also some readable Part ID Paths but surrounded by encoded stuff which I assume must contain if the components are visible or not and which color they have. But it's just a guess.

 

.grp (groups) embedded file

The content seems to be the real definition of the groups. What I could see there is for example

<group
group_type="1"
comment=""
create_user="John Doe"
edit_user=""
create_time="20210511T105752"
edit_time="20210511T105752">
<content_cache>
<a_0
content_type="MCAD_Assembly">
<data
instance="/83"/>
</a_0>
</content_cache>
</group>

 

and the instance (=Part ID Paths) can be manipulated manually which will be recognized correctly by Creo View.

 

 

.etb

The .etb file has an ASCII format which can be edited manually. It looks like this:

0<@@>Root<@@>model<@@>Model<@@>112233<@@>ann0000.ast<@@>0<@@>1<@@>2
0<@@>Root<@@>model<@@>Model<@@>445566<@@>ann0001.ast<@@>0<@@>1
0<@@>Root<@@>model<@@>Model<@@>gruppeBLAU<@@>ann0002.grp<@@>1<@@>0
0<@@>Root<@@>model<@@>Model<@@>gruppeROT<@@>ann0003.grp<@@>1<@@>0
0<@@>Root<@@>model<@@>Model<@@>gruppeGRUEN<@@>ann0004.grp<@@>1<@@>0

 

Is there any Info about the structure of this file? What do the numbers at the end mean?

 

 

It would be very helpful if I could decode (and encode later) the files described above. I did the same witn a .pvs file with the use of pvsoptimize.exe but I don't know if there is a similar tool for .ast and .grp files as well.

 

I could think of a workaround using the WebToolkit in which I already managed to colorize or hide instances and save Annotations. But this seems to be a very old API and can only be used with the good old Internet Explorer. I'd like to create the files in a "non GUI" offline environment if possible.

 

I hope that you can give me some infos or hints how to proceed.

Thank you very much!

David

 

0 REPLIES 0
Top Tags