Jump to content


  • Posts

  • Joined

  • Last visited

LabVIEW Information

  • Version
    LabVIEW 2016
  • Since

Brains's Achievements


Newbie (1/14)



  1. 😄 Thanks Aristos. I find myself in a continual struggle between the light and dark side. I am part of a very small team and one of the main barriers to sticking with byval for us is that the tools for goop based development all seem to prefer byref. While they help to speed up the development process there are always times when a trivial subject for byval such as the above copying process, in byref becomes a complete nightmare. However, for now, the benefits are outweighing the costs.
  2. Thanks MikaelH and Aristos for your answers, I was rather hoping there would be an easier way around this hence my rather open question, but I can see there are too many caveats for it to be a simple answer. My specific problem involved objects containing other objects as Aristos mentioned (I have a composition). However for this specific case I always want to clone the references. The composition is also built exclusively of items with a shared ancestor. So to do it I have taken the method that MikaelH mentioned, included "call parent method", and replaced the "child" references (i.e. the references in the object's attributes) with copies (recursively to ensure all "descendant" references are copies too). Thankfully this does the job 🙂 Here is the top level "DeepCopy.vi": And the modified MikaelH's method "CopyAttributes.vi" (This method is cloned to all the classes inheriting from TestProfileItem): Many thanks to both of you for your help on this.
  3. Hi, Does anybody know the best way to make a copy of a byref object (open gds v4) at runtime and pass all the attributes values (including inherited attributes) to the new object? Thank you! Craig
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.