I am trying to create compatibility properties for nodes using the API. I am not sure of how to use IRobotNodeCompatibilityDef. I am able to add the label and define its data but how do you use the IRobotNodeCompatibilityDef methods to define master and compatibility nodes? Can you please provide a short example?
by CompatibilityDef you can only get \ check compatibility created on model
Dim VLabel As RobotLabel
Dim VData As RobotNodeCompatibilityData
Dim Vdef As RobotNodeCompatibilityDef
'defining and assigning compatibility
Set VLabel = Robapp.Project.Structure.Labels.Create(I_LT_NODE_COMPATIBILITY, "comp")
Set VData = VLabel.Data
VData.UZ = True
Robapp.Project.Structure.Labels.Store VLabel
master_node_number=123
dim Bars as String
Bars = "3 4 5" 'bars list to which "slave" node will ve assigned
Robapp.Project.Structure.Nodes.CompatibleNodes.Set master_node_number, Bars, "comp"
' checking compatibility defined on structure
Set Vdef = Robapp.Project.Structure.Nodes.CompatibleNodes.Get(1)
aaa = Vdef.LabelName 'checking compatibility name \ label used in this compatibility
bbb = Vdef.Bars 'bars list
ccc = Vdef.Main 'checking compatibility main node number
ddd = Vdef.Compatible ' checking compatible node number
Why is it nessicary to have a bars list. What if the nodes i want to "couple" are connected to shell/area elements? Or no elements at all?
ethor wrote:
Why is it nessicary to have a bars list. What if the nodes i want to "couple" are connected to shell/area elements? Or no elements at all?
Even in Robot itself it is not intended to create compatibility between FEs. If you know the trick you can do it.
You can define compatibility between FEs node and bar it the way that main node will belong to FEs and slave node to selected bar(s)