Add custom tables

hector_muñoz
hector_muñoz Member Posts: 2 ✭
I'm trying to learn about FeatureScript and looking at other people's examples, at the moment some tables. I copied some code so that I could study it and make transformations to understand how it works. I have achieved some things but when I want to add my modified table it does not appear (Add custom tables button) but another FeatureScript of variables does appear, I do not know if it is because I copied the code. It only appears in the document where it is. If you can tell us how to make the addition in other documment, I appreciate it.
Sorry for my English

Comments

  • _anton
    _anton Member, Onshape Employees Posts: 555 image
    It sounds like you need to make a new version of the document. Custom tables (and custom features) can only be added from versions.
  • chadstoltzfus
    chadstoltzfus Member, Developers, csevp Posts: 175 PRO
    If you temporarily make the custom table a custom feature, you can debug the table using 
    println(table("Part volumes", columns, rows));
    and execute the custom feature. The table should appear in a readable format in the FeatureScript notices panel. 

    See https://cad.onshape.com/FsDoc/tables.html for some more detailed documentation on custom tables.
    Applications Developer at Premier Custom Built
    chadstoltzfus@premiercb.com