We need to draw/modify some CGM graphics for a customer. These CGM should include the attributes "apsid" and "apsname" for a "grobject", according to the AECMA (ASD) Specification S1000D Issue 1.9.
How can I set these attributes in Corel DESIGNER X5?
I found a predefined element named "Name", but no element named "Id" under object data.
Further, I found out, that when I change the name of a object through the object manager the element "Name" changes also.
We should deliver the CGM graphics as CGM GREX 2.6, so these two attributes have to be correct.
Who can help me? Thanks!
Sincerely, Daniel
When opening existing CGM files in Corel DESIGNER X5, they should display the CGM object attributes with their values in the Object Data Manager. If the "apsid" and "apsname" data fields have been used in the files already, you won't need to define them new.
For new graphics Corel DESIGNER X5 will add "apsname" (using the "name" attribute value) attribute to CGM output for WebCGM 2.x and S1000D (WebCGM) profile.
You can add "apsid" and "apsname" data fields in the Object Data Manager. Go to "Open Field Editor" in the Object Data Manager docker and create new fields for these 2 attributes.What you can also do to get this done in an automated way is using VBA to prepopulate those data fields.In Corel DESIGNER any object in a document gets a unique "staticID" (numeric value) assigned when being created. You could use this staticID value and copy it to the custom "apsid" field. That way you make sure that there is no duplicates for the "apsid" field values....and copy the "name" attribute value to the custom "apsname" field.
Here's a quick example how this could work if the data fields "apsid" and apsname" are present:
Dim aShapes As ShapeRangeDim aShape As Shape
'use selected shapesSet aShapes = ActiveSelection.Shapes.All
'...and apply object data to themFor Each aShape In aShapes aShape.ObjectData.Item("apsid").Value = aShape.StaticID aShape.ObjectData.Item("apsname").Value = aShape.Name
Next aShape
On CGM export (also to ATA GREX 2.6 CGM) these object attributes will be included as CGM metadata.
Klaus I appreciate this example it has been a great starting point for me, but I would like to expand on it and I have been doing some reading trying to figure it out on my own but to no luck, so I am hoping you would be willing to help me. I am sure this will be simple for you.
I would like create a random number using the system timer * a number to create the apsid vice using the "StaticID".
Second for the apsname value I have been trying to figure out how to make it pull the text that I type when creating a call out. When I create the call out the program automatically names it "Text: Arial (Normal)" in the Object Manager, but I want it to use what I type.
Third, would it be possible to draw a region around each call out so when the graphic is used in a IETM it show a visible area around the call out?
I have attached a example file of a illustration with some call outs created with X6.
Thanks,
Terry Wade