Cancel
Showing results for 
Search instead for 
Did you mean: 

Export/Import TableFile or Chart from/to Models

Legend
Legend

Hi all,

 

I like to reuse tablefiles/charts/methods from one model to another.

How can I export these from one model and import to another model ?

I did not find anything in help ....

I like to right-click on these objects and export them to file to import ....

 

 

Regards

Marco

 

9 REPLIES 9

Re: Export/Import TableFile or Chart from/to Models

Siemens Phenom Siemens Phenom
Siemens Phenom

If you open a method or table you can find Import, export and print commands in the upper left corner. I assume those are the ones you are looking for.

Re: Export/Import TableFile or Chart from/to Models

Legend
Legend

Yes, is feasible for methods and tablefiles, however need to create new object in the destination, then import the exported object and finally rename it.

 

.... but for charts they is no way to do this.

 

 

 

 

Re: Export/Import TableFile or Chart from/to Models

Siemens Phenom Siemens Phenom
Siemens Phenom
Try this then: Create a copy of the "method" object in a new folder (e.g 'MyFolder') and rename it to whatever (e.g. 'MyMethod') you want. Open your new method object and write your code. When you are finished, right click your methods and select "Save object as..."

You can then simply drag the object file into the class library of the new model where you want to import the code. The same should work for tables.

If you have many different methods and tables you want to export/import Check in the help on how to create custom libraries.

Charts on the other hand only display results (as far as I know at least), so i don't see the point of exporting them. If you want to save the charts, look up how to use the 'HTMLReport' object.

Re: Export/Import TableFile or Chart from/to Models

Legend
Legend

Sure, creating a method object in the class library is no problem.

So I should not have individual methods on the frame, but create them as classes in the library.

 

I want to export the chart setup, the inputs table, font settings etc...

...not the result.

Same here, need to copy the chart in the class library, setup and export this template.

 

OK, thanks I will change the way I work in PlantSim.

 

 

Re: Export/Import TableFile or Chart from/to Models

Siemens Phenom Siemens Phenom
Siemens Phenom
I believe that it is possible to do the same thing with charts as well. I expect that there might be some errors in paths to different table and such though, but since I've never tried it I can't say for sure. If you do try it, please share the results!

Re: Export/Import TableFile or Chart from/to Models

Gears Phenom Gears Phenom
Gears Phenom

@MarcusA  schrieb:
Charts on the other hand only display results (as far as I know at least), so i don't see the point of exporting them. If you want to save the charts, look up how to use the 'HTMLReport' object.

A note on that, even though apparently not relevant to the OP: charts also (can) collect the data they display > Chart.CollectData. And you could save those results by either putting them into a tablefile first (Chart.PutValuesIntoTable) or by saving the displayed chart (Chart.CopyBitmapToFile). And saving them as an object should also export the results data, but of course that doesn't make sense Smiley Wink

___________________________________________________________
Alex Dilg, Consultant at SimPlan AG (www.SimPlan.de)
This post was good and/or helpful to you? Please provide some Kudos, thank you!

Re: Export/Import TableFile or Chart from/to Models

Legend
Legend

I have implemented a chart template in the class library where I do the basic setups as type of chart, fonts of legends, title etc....

I create a few instances in the frame and rename them to reflect the type of worker (tool tester, parts verificator etc...)

During the resetting the inputs table is updated just by reading the

...

param objTable : object    <<< as input

var tInputChannels : table

....

tInputChannels := objChart.inputChannels

  for iWorker := 1 to NrWorkers
   tInputChannels[iWorker,0] := sWorkerType + " " + iWorker
   tInputChannels [iWorker, iIndex] := <WorkerType + "Chart[" + to_str(iCol) + "," + iIndex + "]"
   iCol += 2
  next

....

 

Re: Export/Import TableFile or Chart from/to Models

Gears Phenom Gears Phenom
Gears Phenom

I just had to give you Kudos, because I finally found someone on this forum that uses a nomenclature for local variables (adding the datatype as first letter) Smiley Very Happy

___________________________________________________________
Alex Dilg, Consultant at SimPlan AG (www.SimPlan.de)
This post was good and/or helpful to you? Please provide some Kudos, thank you!

Re: Export/Import TableFile or Chart from/to Models

Creator
Creator

hi,

 

for reusability from one model to other u can try the below option

 

1) in user objects create a folder

2) Drag and drop tablefiles/charts/methods in to this folder

3) right click on the folder and save as object.

4) open the new model, create  a folder in user objects

5) right click on the folder>>>save/load>>load object onto the folder( same object which u saved in Step 3)

6) Now this folder will have all the tablefiles/charts/methods of the previous model

7) Drag and drop to the new model frame.