Need help on Generic Naming / Persistent tags

Aniket Sane

Need help on Generic Naming / Persistent tags
Hi friends,
            Greetings ! I'm a newbee in CAA software development and thus need some insights to solve a problem I'm facing in my work.I need to find a way to identify a topological entity (EDGE/FACE/VERTEX ) by a unique identifier and that identifier should persist across sessions.So that in next session,I should be able to find the same topo entity by using the id ( unless the topo entity itself is deleted ! )
            I think there is "GetPersistentTag( )" method available,but what it gives is persistent during a session ( please,correct me if I'm wrong ).Moreover,if the entity gets modified ( e.g the geometry of the topological entity is changed/replaced ) then a new tag is given to the same topology.Now this won't help to someone who relies on the id to refer the topo entity.
             I finally came across Generic Naming.But after reading about it and appreciating the way it uniquely identifies the topo entity across sessions,by coupling it with the feature history et al,I am still unable to find "how to access generic names of the topological entities" while reading a CATIA model.To be more specific,I'm not creating new features or anything.I'm just reading the already created/designed data from a file ( say some model.CATPart ).
            I will be really obliged to get some insights on how to go about this.Thanks in advance.

-Aniket.

Mike Berry

RE: Need help on Generic Naming / Persistent tags
(in response to Aniket Sane)
Sounds like you are using CAA RADE? If so I can' t help much. If I understand correctly what you are trying to do though, I can tell you it is pretty easy with the COM automation API. What kind of solution you are looking for?

-Mike

Aniket Sane

RE: Need help on Generic Naming / Persistent tags
(in response to Aniket Sane)
Hi Mike,
            Thanks for your reply.Let me tell you the kind of solution I'm looking for.I'm actually using CAA development APIs in C++ by making the calls from my application.( I'm not sure if that can be called RADE exactly,help me out in that ).
            And the COM automation APIs would be used to work directly on the model in the Catia V5 modeller itself,through a script ( prbbly in VB if I'm not wrong ) for automating the tasks.Correct me if I'm wrong,I'm new to this.
            Now my further question is,if CAA gives access to the generic naming or some such functionality ( which effectively gives you persistent/stable access to the topology across sessions ) through the automation APIs,then isn't that pretty likely that such access would also be available through C++ APIs for  CAA development ? I'm just thinking aloud,so bear with me.
            I'll be really thankful if you can clarify my doubt and guide me further.
Thanks again for your time.
            If anybody else has any suggestions,then please share them with us.
Thanks.


-Aniket.



Mike Berry

RE: Need help on Generic Naming / Persistent tags
(in response to Aniket Sane)
Basically there are 2 API's for CATIA. The first is the C++ API which is generally called CAA or CAA RADE and the other is the COM Automation API which is sometimes called CAA2. For CAA2, VB is the most popular language used but you can use any language that supports COM. For sure the CAA API has extensive generic naming functionality (more than CAA2) but I can almost guarantee it is a more complex framework to work with compared to CAA2 (especially if you are new at this). I guess you need to consider exactly what you are looking to do and choose the best tool.

-Mike

Aniket Sane

RE: Need help on Generic Naming / Persistent tags
(in response to Aniket Sane)
Hi Mike,
            Thanks for the patient discussion.I understand that automation API fw   ( i.e CAA2 ) must be more easy to use and explore.But the thing is right now I dont have the choice to choose between the two frameworks.I am supposed to add code to an existing architecture which is based on CAA.So somehow I have to figure this out in CAA framework only.
            Moreover,like you have said,CAA is supposedly having more functionality ( and being in probably a lower level access than CAA2,i think ),so I am thinking that there must be something which can give us access to generic naming of the entities.May be there wont be a single dainty API which does that for us and I might have to make several calls and put in some intelligence in code before I get something,but still I'm still optimistic that technically it should be possible.
            Any thoughts ? Thanks.


-Aniket.

Mike Berry

RE: Need help on Generic Naming / Persistent tags
(in response to Aniket Sane)
Aren't there any use cases for this in the CAA docs? Usually there is really good detailed info there (if you can find it!)...I can tell you that this forum is 99% automation programmers, so you likely will not get an answer to a CAA question. If you are on LinkedIn, you might try posting to the CAA programmers group. They are the opposite (mostly CAA, not automation guys) and you will probably get some good help.

-Mike

Aniket Sane

RE: Need help on Generic Naming / Persistent tags
(in response to Aniket Sane)
Mike,
       I have been looking into the documentation for some time now.They do have info on generic naming and how it is useful,how to create your features so that you can avail yourself of the gen naming functionality and so on.But unless I'm missing on some part of the documentation,there isn't anything which describes how to access the generic name for a topological entity.May be there is some long-drawn way of getting to it,but right now I'm not able to find it.
       May be I should refine ( or intensify ) my search.And I'll surely have a look on CAA forum on LinkedIn.If I find something,I'll surely let you know.And in the meantime if anything occurs to you or if you get to know of some source of info,then kindly let me know.Thanks for everything.
       And I like your blog about V5 automation.Keep it up !
Bye.

-Aniket.