PageSourceSearch

https://kanoa-software.netlify.app/assets/js/4e9f9098.83b61439.js

js kanoa-software.netlify.app collected 2026-10-03 10:59:51 UTC 3,499 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkkanoa_software=globalThis.webpackChunkkanoa_software||[]).push([[12527],{27785(e,n,t){t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>a,default:()=>u,frontMatter:()=>o,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"systemFunctions/quality/config/addUnit","title":"system.kanoa.quality.config.addUnit(unitInfo, userId)","description":"Adds a new engineering unit. All unitInfo keys are required.","source":"@site/docs/systemFunctions/quality/config/addUnit.md","sourceDirName":"systemFunctions/quality/config","slug":"/systemFunctions/quality/config/addUnit","permalink":"/systemFunctions/quality/config/addUnit","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"id":"addUnit","title":"system.kanoa.quality.config.addUnit(unitInfo, userId)","hide_table_of_contents":true},"sidebar":"tutorialSidebar","previous":{"title":"addTolerance","permalink":"/systemFunctions/quality/config/addTolerance"},"next":{"title":"checkTolerance","permalink":"/systemFunctions/quality/config/checkTolerance"}}');var i=t(74848),r=t(28453);const o={id:"addUnit",title:"system.kanoa.quality.config.addUnit(unitInfo, userId)",hide_table_of_contents:!0},a=void 0,d={},c=[{value:"Parameters",id:"parameters",level:3},{value:"Returns",id:"returns",level:3},{value:"Example",id:"example",level:3}];function l(e){const n={code:"code",h3:"h3",hr:"hr",p:"p",pre:"pre",strong:"strong",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"Adds a new engineering unit. All unitInfo keys are required."}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"parameters",children:"Parameters"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"unitInfo"})," ",(0,i.jsx)(n.code,{children:"Dictionary"}),(0,i.jsx)("br",{})]}),"\n",(0,i.jsx)("table",{class:"dictionaryKeyTable",children:(0,i.jsxs)("tbody",{children:[(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:" - enabled"}),(0,i.jsx)("td",{children:"Boolean"}),(0,i.jsx)("td",{})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:" - engUnitName"}),(0,i.jsx)("td",{children:"String"}),(0,i.jsx)("td",{})]})]})}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"userId"})," ",(0,i.jsx)(n.code,{children:"Integer"}),": Id of user executing the function",(0,i.jsx)("br",{})]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"returns",children:"Returns"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"engUnitId"})," ",(0,i.jsx)(n.code,{children:"Integer"}),(0,i.jsx)("br",{}),"\n",(0,i.jsx)(n.strong,{children:"msg"})," ",(0,i.jsx)(n.code,{children:"String"})," None if success",(0,i.jsx)("br",{})]}),"\n",(0,i.jsx)(n.hr,{}),"\n",(0,i.jsx)(n.h3,{id:"example",children:"Example"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"unitInfo = {'engUnitName': 'Kilograms', 'enabled': True}\nuserId = 5\nengUnitId = system.kanoa.quality.config.addUnit(unitInfo, userId)\n"})})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},28453(e,n,t){t.d(n,{R:()=>o,x:()=>a});var s=t(96540);const i={},r=s.createContext(i);function o(e){const n=s.useContext(r);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.