can not rebuild aec model data for forge viewer model (NWC) - data-visualization

I am trying to use below code for rebuilding aec model data and I have nwc model
const aecdata = Autodesk.AEC.AecModelData.computeLevels(levels, viewer.model);
I found this code part from below link. But, when I try to use computeLevels function I get the error - "AecModelData.js:424 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'myData')". What can be the problem?
https://forge.autodesk.com/blog/add-data-visualization-heatmaps-rooms-non-revit-model-part-i-nwc

Related

TypeError: Cannot read properties of undefined (reading 'get') - in discordJS v13.6.0

I can't find the error, someone help me
\\interactionCreate.js
if (!interaction.isCommand()) return;
const command = client.interaction.get(interaction.commandName);
if (!command) interaction.reply('wrong');
command.run(client, interaction);
i am writing a file interactionCreate.js for my bot and it is getting error, many people told me to try and see if i wrote it correctly but i can't see it, this is just a part of it

TypeError: Cannot read properties of undefined (reading 'maps')

I am trying to use the DistanceMatrixService from #react-google-maps/api. One of the required parameters is the 'travelMode'. However, when I tried setting 'travelMode' to 'DRIVING', it shows the following!
I tried doing
travelMode: google.maps.TravelMode.DRIVING
but it also throws a type error
TypeError: Cannot read properties of undefined (reading 'maps')
Here is a snippet of my code where I call the Distance Matrix Service.

Validating a non-existent field error in console

My problem is I am getting this error when I try to validate my fields with VeeValidate on my system.
Uncaught (in promise) Error: [vee-validate] Validating a non-existent field: "". Use "attach()" first.
at createError (vee-validate.esm.js?00d1:297)
at Validator._handleFieldNotFound (vee-validate.esm.js?00d1:2282)
at Validator.validate (vee-validate.esm.js?00d1:1959)
at ScopedValidator.validate (vee-validate.esm.js?00d1:3276)
at VueComponent.next (QueryAcademicForm.vue?f0b2:332)
at click (eval at ./node_modules/vue-loader/lib/template-compiler/index.js?{"id":"data-v-e5b3dc5a","hasScoped":false,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/QueryAcademicForm.vue (0.3f605440c8faec0820bd.hot-update.js:22), <anonymous>:364:25)
at invoker (vue.esm.js?efeb:2027)
at HTMLButtonElement.fn._withTask.fn._withTask (vue.esm.js?efeb:1826)
I tried to replicate it here on jsfiddle, it gives me same error but there is little bit difference in error message
Uncaught (in promise) Error: [vee-validate] Validating a non-existent field: "result". Use "attach()" first.
at Re (vee-validate.min.js:1)
at vn._handleFieldNotFound (vee-validate.min.js:1)
at vn.validate (vee-validate.min.js:1)
at ln.validate (vee-validate.min.js:1)
at a.validateBeforeSubmit ((index):355)
at click (eval at $a (vue.min.js:6), <anonymous>:2:4043)
at t (vue.min.js:6)
at HTMLButtonElement.Ir.t._withTask.i._withTask (vue.min.js:6)
One thing to notice that error is not on every instance of form-input component rather only on the last step.
The issue appears due to "in-place patch" strategy that Vue.js uses. This case is described in the VeeValidate documentation. Basically, you need to tell Vue.js to track all child components separately by setting unique value to the key attribute for each input element:
<form-input key="unique"></form-input>
Here is a working JSFiddle example.
In my case it did appear because my HTML dynamically renders based on the certain condition and I was using this piece of code <div v-if="condition"... > for dynamic rendering. Despite the fact I was using unique key.
To solve the issue, I've changed the v-if to v-show like this <div v-show="condition"... > and error's gone.
Reference

Error "TypeError: Cannot read property 'ODP' of undefined" on node-red

I'm developing a program in node-red that gets tags from a database and should then "write" the value of them on a connected plc, but some tags are not passed due to this error "TypeError: Cannot read property 'ODP' of undefined" the script inside the node that from error is the following :
"msg.payload = {"value":[''+msg.payload[0].ODP+'']};
return msg;"
the tags are : OPD (string[30]) , DATA(string[10] , QUANT_INIZIALE DINT , QUANT_PROD DINT
The error implies that your input msg.payload to the function node is not an array.
It is not possible to see in the image you have posted, exactly which node the error is happening on, but if you attach a debug node before point you should be able to see what the input message looks like.

From Extjs4 to Extjs5 Uncaught TypeError: Cannot read property 'metaData' of null

Uncaught TypeError: Cannot read property 'metaData' of null
I'm still having this error.I moved from Extjs 4 to 5.Any Ideas?
Uncaught TypeError: Cannot read property 'metaData' of nullext-all-debug.js:61885 Ext.define.createAccessor.resultext-all-debug.js:61791
Ext.define.readRecordsext-all-debug.js:59803
Ext.define.readext-all-debug.js:61444
Ext.define.processResponseext-all-debug.js:61746 (anonymous function)ext-all-debug.js:5750 Ext.apply.callbackext-all-debug.js:16297
Ext.define.onCompleteext-all-debug.js:16236
Ext.define.onStateChangeext-all-debug.js:4710
Ext.Function.ExtFunction.bind
The data object that is pass into the method is null. Make sure that in your proxy definition your're pointing to the correct data root in your payload. Moreover creating a Sencha Fiddle or JSFiddle will be pretty helpful to solve this issue.