Community
Participate
Working Groups
Hi, I have a library with datasets and grids that use that datasets. I need to copy a grid of the library to a model. I try with : DesignElementHandle copieHandle=new GridHandle(design.getModule(),(DesignElement)eih.copy()); and ElementCopy copia = CopyUtil.copy(eih); CopyUtil.paste(copia, cell, cell.getContent( ).getSlotID()); Where "eih" are de Gridhandle of the library. In my model I have other datasets with the same name of the datasets in library because i want to use these datasets in the copie-grid. But it is not possible because with copy de datasets in the grid are linked to the library (Library.DatasetName). Example: if in library dataset reference (binding)is D1 when I copy the grid dataset reference change to library.D1 and i need it remains D1. Could I copy a grid of a library without datasets linked to the library ? Thanks in advance.
I tried the CopyUtil. It works OK. The point is the way you get the handler. Please open the library file directly rather than getting its handle from the design file by namespace. Then you can use the second way you metioned to copy the grid in the library into the design file without datasets linked to the library.