in hook Edm_Cmd_PostState i have recieved mlObjectID3(integer) with the ID of transition.
how can i resolve this ID to transition Name(string)?
can’t find how do it in API-help…
PS: make query to SQL server table [dbo].[Transitions] is not a good idea))))
I’m curious about why is query to SQL table not a good idea.
I’m a so-so programmer, and I’m not sure that I can implement this with proper code security. the password will be sewn into the program.
but I came up with a scheme for how to do this without crutches, using built-in PDM methods.
for example, as described here, we grab all the transitions in the desired state.
each object has an ID property. we read it for each transition.
adding the ID-NAME data to the C# dictionary
and now we can resolve transition name from its ID)))
You’re explanation lead me to this:
GetObject Method (IEdmVault5) - 2017 - SOLIDWORKS API Help
Type of object is 4
EdmObjectType Enumeration - 2017 - SOLIDWORKS API Help
cast it to transition then get the name from that?
brilliant! thx! but for now, its the biggest problem - IEdmBatchUnlock Interface
how to override version…
You can use this:
IEdmTransition5 edmTransition =(IEdmTransition5) EdmVault.GetObject(EdmObjectType.EdmObject_Transition, 0);
string name = edmTransition.Name;