Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: HostObject and sub graph issue

HostObject and sub graph issue 3 years 10 months ago #10676

  • Snarf77
  • Snarf77's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 847
  • Thank you received: 2
  • Karma: 5
Hi claes,

I have created in a class volume a new classdef object with few attribute (of type $boolean)

I want to add a GE interface for this new class so I created a pwg view with the same name of my previously created class and I ticked the "subgraph" attribute in graph attribute menu. I plan to use the hostobject dynamic so my GE dynamic attributes are of type $object.atrribute1 ... in order to drive various dynamic

In runtime, under rt_xtt if I navigate to my plant object, the "GE" icon appears and I can correctly interact with my object so the dynamic look correctly mapped to the object.

Now I want to add several object of this class object in a new GE graph so I consequently create a new GE graph where I add several subgraph instances. I connected them to the several plant instances of my class and I start the runtime.

when I open the view, my object are not animated like if they were not connected to my plant object at all.

if I start the class GE view and specify the instance by : open graph classname /instance=Plant-myinstance it works perfectly.

What can I have forgotten to connect plant object to subgraph ?

Thanks in advance
Snarf
The administrator has disabled public write access.

HostObject and sub graph issue 3 years 9 months ago #10692

  • Snarf77
  • Snarf77's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 847
  • Thank you received: 2
  • Karma: 5
Hi all, nobody for this one ?
thanx
Snarf
The administrator has disabled public write access.

HostObject and sub graph issue 3 years 9 months ago #10693

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3176
  • Thank you received: 501
  • Karma: 133
Hi Snarf,

Your graph is a mix of a class graph and a graphical symbol.

A class graph is a separate graph that shows info about the object. I should have the same name as the class (with lower case) and you use $object to reference the instance object. The 'subgraph' attributet should not be set for this graph. The class graph can be opened with the command 'open graph /class/instance=... or from the popup menu for the object. You can embed one or several class graphs in another graph with Window objects where you state the instance object in the Window object.

The symbol for an object is a subgraph and for this the 'subgraph' attribute should be set. The default dynamics is set in the graph attribute menu, and for more advanced dynamics HostObject can be used where the object is referenced with $hostobject for elements in the subgraph. The name of the subgraph should not equal the class name as this is reserved for class graphs.

/Claes
The administrator has disabled public write access.

HostObject and sub graph issue 3 years 9 months ago #10701

  • Snarf77
  • Snarf77's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 847
  • Thank you received: 2
  • Karma: 5
Thanks for clarification.
I have taken an old working graph as example but I guess it has been modifed since then but not taken into account due to main graph still configured with "All Intern" concerning its used subgraphs. So my example was indeed corrupted which lead me in the wrong direction.

I have modified $object to $hostobject and modified the name not to match the object name and its working like a charm.

Thank you very much
Snarf
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 7.799 seconds