Array as value in json metadata properties send by Forge Derivative API - arrays

I have a question about the structure of metadata properties extract from a translated IFC model. In the JSON I get all the properties for all objects and sometimes the value for a property is an array.
For example in the picture, first line, the category of the object is not a string but an array.
I don't know if it's a bug or something wrong in the IFC but when I open it in IFC viewer, values are only strings, there is no array. The current IFC is the urban house model that I found on the Autodesk website and often used in the forge demo.
It's not a critical problem for me, I just check each time if the value is an array.
I just wanted to know.
Thanks
Example of array in properties values
You can download IFC and Revit file
Urban_House.ifc
Urban_House_2018.rvt

Related

Is Firestore a good database for storing many large objects in?

I have been using React/Leaflet to create a choropleth map that can color any country on the map. What I am trying to do is to develop a save/load function that saves the colored countries and later be able to import it from the database. When this object is saved and loaded, it can bring back the exact same countries that were colored. I have been using firebase/firestore but I haven't been getting any luck.
This is how my object of map data looks like
Is Firestore the right database to do it? Or should I approach another database? I need a database that can store multiple objects in the picture above.
If you can convert that file into a JSON of a size smaller than 1MB, which is the Firestore Document size limit, it is possible. In the case you are proposing I would have the following structure, from the information you shared but fell free to adapt it as you see fit:
Map Collection
field1
...
fieldN
CountriesOptions Subcollection
optionObject: {}
Where each object is a separate document in the CountriesOptions subcollection converted to JSON using JSON.stringify(obj).
For more information on how to structure your Firestore with subcollections you can check this link to the documentation.

Azure Search: rotationFromOriginal not properly populated

As I am reading here, "when the imageAction is set to generateNormalizedImages, the new normalized_images field will contain an array of images. Each image is a complex type" which should contain a very important field for my scenario (rotationFromOriginal).
I noticed that, even if Azure Search perfectly accomplish the rotation of the images, this property will always be 0 (unlike other fields as originalWidth, which are correctly populated).
Do you know why I have this issue? Am I the only one?
AFAIK, the value of rotationFromOriginal was in normalized_images and it was as an input, so it must be populated at first.
And use the parameters in normalized_images json file to rotation and process image. For more details, you could refer to this article.

Multiple dependent controllers/directives on a single page?

I want to display something like this in a single page. The complication is that this data comes from 4 different sources.
City One
Property One
Property Two
Property Three A
Property Three B
Property Three C
City Two
Property One
Property Two
Property Three A
Property Three B
Property Three C
City Three
Property One
Property Two
Property Three A
Property Three B
Property Three C
City - comes from JSON A, which returns a simple array of n objects containing name and id.
Property One comes from JSON B (using City.id as a parameter in the URL), returning one set of objects specific to City.id.
Property Two comes from JSON C (using City.id as a parameter in the URL), returning one set of objects specific to City.id.
Property Three A/B/C comes from JSON D (using an key field returned in Property Two), returning one set of objects specific to a particular property key specified in Property Two.
Is this even doable? I'm aware that this requires 3n+1 semi-synchronous JSON calls. At this point I don't know if I should be looking for help on controllers or directives or some kind of crazy routing or what.
I'm a total noob at Angular (I come from an ASP.NET MVC background) and I can't wrap my ahead around this. I've been trying to follow John Papa's Style Guide, so there isn't a $scope to be found anywhere in my code, which is severely limiting my understanding of some pages I've looked up to solve this.

ng-repeat convert resource objects to simple objects

Iam getting my data with help of the Angular's $resource service as array. Each element of that array is an Resource-Object. So i can use methods like $save and $update of these Objects. In a view i represent my array with the help of the ng-repeat directive like:
<div ng-repeat="appointment in object.appointments" ng-click="editAppointment(appointment)">
And here i get in trouble. The appointment-Object i get in the editAppointment-Method is a simple Object. No Resource Object anymore. So i cant use the helpfull methods like i mentioned above.
$scope.editAppointment= function(appointment){
console.log(appointment); // > Object
console.log(object.appointments); // > Array of Resource
}
Have somebody noticed that problem too? May its a bug, but i cant imagine that.
Assuming your resource class is called Appointment, you should just be able to do:
$scope.editAppointment= function(appointment){
new Appointment(appointment).save();
}
Presumably your Appointment resource looks something like the following (i.e. it correctly maps some sort of id property from existing objects to the URL parameters):
var Appointment = $resource('/appointment/:appointmentId', {appointmentId:'#id'});
This would be the case if your appointment objects (i.e. the underlying JSON objects handled by your API) have an ID property called id. If it's called something else (or if there are multiple path variables in your URL) you'll just need to change the second argument to map all of the properties of the objects being saved (the values starting with '#') to the URL path variables (the things starting with ':' in your URL).
See where they save a new card in the credit card example here: http://docs.angularjs.org/api/ngResource.$resource. The fact that they're dealing with a totally new object and that you're trying to save an existing one is irrelevant. Angular doesn't know the difference.

Save error: Initial term of field expression must be a concrete SObject: MAP<String,AcctId__c>

I'm trying to get over a limitation in Salesforce where Lead objects can't have related lists that convert with the Lead over to Opportunity, Contact and Account. I have set up 4 objects of type Lookup Relationship, and created a dummy record in each.
I want to use Custom Settings to store the id of each of these dummy records, so that when the Lead converts, any custom objects can also convert to objects with Master/Detail relationships on the respective standard objects.
My trigger on Lead(after update) tries to create a Map of the Custom Settings:
Map cs = AcctId__c.getAll();
AcctId__c is the Custom Setting api name. Compile time is giving me the above message.
Now, I copied this code directly from the Salesforce documentation. What am I forgetting?
I believe that you must include the actual map definition <String,AcctId__c> after the word Map.
Check out this page.
http://www.salesforce.com/us/developer/docs/apexcode/Content/langCon_apex_collections_maps.htm

Resources