Hello,
I’m currently working on a project where I need to model several specialized infrastructures using Catia Magic. These infrastructures are all different, but they frequently use the same types of equipment, such as actuators, sensors, and electrical cabinets. To save time and ensure consistency, I’m looking to create a reusable library of specialized machines that I can instantiate and customize across different models.
My goal is to define generic equipment Blocks (e.g., motors, sensors) with customizable attributes. Each instance of a Block should allow for different attribute values depending on the context. For example, a motor used in Infrastructure A may have a power of 20 kW, while a similar motor in Infrastructure B may have 25 kW. These attribute values must be instance-specific while being based on a generic definition.
Another key requirement is the ability to connect equipment using Ports (or similar mechanisms) and automatically verify the compatibility of those connections. For instance, I want to prevent a 20 kW motor from being connected to a 50 W generator.
So far, I have successfully created generic equipment Blocks with customizable attributes and defined Ports using Interface Blocks. However, my main challenge lies with the Interface Blocks: they need to be manually assigned to each Port, which is cumbersome. Also, the Interface Blocks themselves don't hold any attribute values — all data remains within the equipment Block. Finally, once two Ports are connected, there is currently no automated validation of the compatibility between attributes such as power or voltage.
Ideally, I would like each Port to be typed with an Interface that includes constrained attributes, and for an automatic compatibility check to occur when two Ports are connected. The system should alert the user in case of an inconsistency between attribute values. The overall workflow should remain simple: select an equipment item from the library, set its attributes, connect it to another machine, and be notified if the connection is invalid.
Has anyone implemented something similar in Catia Magic, or do you have suggestions or experience with achieving this type of behavior, possibly using custom profiles, stereotypes, or Groovy scripts?
