Parent categories - categories

I am wondering about the following:
There is a category called Mass Walls, this category has a ParentCategory: Mass
The category Mass has SubCategories. But in that list you don't see: Mass Walls
What kind of Categories is: Mass Walls
because it looks like this:
ParentCategory
ChildCategory
SubCategorie1
SubCategorie2
SubCategorie3
etc...

It appears to be for a GraphicsStyle of the same name and is probably for some internal usage instead of allowing elements to use it.

Related

Autodesk forge highlight child object

Recently i've been working on this repository https://github.com/xiaodongliang/forgeviewer_embed_in_powerbi_report to build a custom visual in Power BI to visualize the issues extracted from Bim track'S API.
The idea was visualizing them in associaton to the model's ROOMS.
In order to do that I worked with a NWC file, so i cuold export rooms as a geometry.
What i would like to do now is to highligt the rooms if a connected issue is selected from a table.
The problem is When i select an issue from a table, in the selection tree i can see highlighted the parent object name (ROOM) instead of the child (solid), and i think that is why i can't achieve my purpose (if not please correct me).
what i have
what i wold like to do
Does anyone know a way to do that?
If you would like to change your selection between (FIRST_OBJECT, LAST_OBJECT, LEAF_OBJECT) you can change viewer selection settings in order to test:
If you would like to achieve this programmatically :
Viewer.setSelectionMode();
could help you as well.
If I well understood, you want to highlight the child (which contain the mesh) instead of the parent.
The object highlight (isolate) is done in /forgePowerbiView/src/visual.ts with this code:
const dbIds = options.dataViews[0].table.rows.map(r =>
<number>r[0].valueOf());
console.log('dbIds: ' +dbIds)
this.forge_viewer.showAll();
this.forge_viewer.impl.setGhostingBrightness(true); //for isolate effect
this.forge_viewer.isolate(dbIds);
Take a look at this link Enumerating leaf nodes on Viewer. This will help you to get the dbIds you want to isolate.

Mixing and aligning non-Smart fields in a SAPUI 5 Smartform

The attached screen below works just fine but underneath the covers I have a slight problem ^^
Smartform with both simple and smart fields
Behind the view there's a smartform (no annotations used). Field "Agreement Action Type" and the last two pairs of fields are not smartfields (found no "smartcombo" or something similar to use) they are just pairs of labels and comboboxes and here comes the issue. While the smart fields were all perfectly aligned, comboboxes (aka simple fields I suppose) were not aligned along. In order to solve this for the moment, I used a couple of SAPUI5 formatting classes and...width declaration in pixels in the combo definition within the view. Results works fine, even in different size monitors but, even though I'm currently in the process of learning and understanding the technology, I already know that the latter is a crime against SAPUI5. Is there a way to align smart and simple fields in the same view (or an equivalent dropdown control for smartforms alternatively) or I will have eventually to get rid of my smartform (losing small bonuses like the togglable attribute) and use a simple form instead?
Thanks for taking time to read it.
Regards,
Greg
The GroupElement aggregation manages the SmartLabel for you so try to remove the label inside the GroupElement aggregation like this:
<smartForm:GroupElement label="Label">
<Input type="Text" value="someValue"/>
</smartForm:GroupElement>
On the contrary, if you want to change the appearence of your SmartField, you can use ControlType to configure the internal control.

Leaflet: How to specifiy order of overlays in the layers control?

Is it possible to order overlays within the layers control?
Here's my issue. When I do this with my overlays:
var overlays = {
"Apples": apples,
"Bananas": bananas,
"Peaches": peaches
};
L.control.layers(baseLayers, overlays).addTo(map);
Leaflet adds the overlays to the layer control on the map in a random fashion (due to iteration):
- Bananas
- Apples
- Peaches
Is it possible to specificy the order I want to show the overlays? *(In my case, I'd like to have it alphabetical. Also, I am using the Mapbox API)
Thank you.
I am not sure if Mapbox API has changed the default Layers Control code / behaviour, but the latter does not provide a 100% reliable way of displaying overlays in a specific order. See that post for details.
The explanation is that the Layers Control iterates overlays by their "stamp" (a unique identifying integer that is created using L.stamp(myLayer)). Depending on your type of layer, this stamp is assigned automatically but at different moments.
You can force its creation right after having instantiated your layer. For example in your case:
var apples = L.layerGroup();
L.stamp(apples);
var bananas = L.layerGroup();
L.stamp(bananas);
var peaches = L.layerGroup();
L.stamp(peaches);
Unfortunately the order of iteration is not guaranteed as per JS spec, hence the impossibility to have a 100% reliability in this behaviour.
That being said, in all browsers I have tested, the order is in accordance with the natural number order, so as of today, this trick works.
If you want more confidence, you should look for Control plugins that explicitly provide you with the functionality to specify manually the order of listing.

TYPO3 generate two Models with one Form

I want to generate and persit multiple objects with only one form.
In My Form I have fields für Model Object House and fields for Model People, First 3 are for House and last 3 are for People.
Wenn I submit the form I want to create a Object for House and A Object for People. And the People should get the Relation to the house.
I tried this:
public function createAction(\Blubb\Blubb\Domain\Model\House $newHouse, \Blubb\Blubb\Domain\Model\People $newPeople) {
$this->houseRepository->add($newHouse);
$this->peopleRepository->add($newPeople);
$this->redirect('list');
}
Form looks like this:
how can I select which elements are for the House and which for the People?
Alternatively i tried set another form where i specified the name of Input like this:
name="house[housenr]" --> Then I got this error: Required argument "newHouse" is not set.
Remove params from your createAction() so you can use methods
$this->request->hasArgument('foo')
$this->request->getArgument('foo')
for custom collecting fields.

TYPO3 Extbase & Fluid Grouped output with attribute from m:n relation

I'm using some domain with m:n relations in an Extbase TYPO3-Extension and want to get an output grouped by an attribute from a m:n-relation child, ideally respecting including entries having several relations.
Let's say I have Books and Categories. Books have some "title" and a "memberOfCategories" attribute, Categories have some "name" and a "areBooks" attribute. The general m:n thing (using some mn-table and the necessary fields in TCA and so on) works fine.
Using fluid, output of all categories of a book works fine, as well as all books having a certain category and so on.
But I need (in the book view / action context!) some output like that (including "duplicate" output of books belonging to more than one category):
Category A
Book A
Book B
Category B
Book A
Book C
(No Category)
Book D
Book E
I tried using the f:groupedFor ViewHelper, but that does not work as I want. Grouping by the child attribute (category.name) does not work as desired:
<f:groupedFor each="{books}" as="booksOfThisCat" groupBy="memberOfCategories.name" groupKey="memberOfCategories.name">
<h3>{memberOfCategories.name} (should be category name)</h3>
<f:for each="{booksOfThisCat}" as="book">
<li>{book.title}</li>
</f:for>
</f:groupedFor>
My first try was grouping just by memberOfCategories - but that leads to a different and unuseful result as well, because memberOfCategories only references to the "number" / set of relations, so the grouping is rubbish.
Sure that would all be very easy if I worked within an action of Categories, there it would just be a simple for each category { for each areBooks } thing, but I need that output in an action / view regarding books.
I'm pretty much sure I'm just too dumb or blind - and may have confused some readers with the slightly pidgeon English ;-), anyhow, it would be great if anybody had some hint for that. Found some similar question regarding grouping by dates, solved with a custom view helper, but I thought there might / should be an easier solution.
Oh oh - now I just got behind it on myself, it's just that simple:
Add / inject the category-Repository to my books-controller and assign its desired output (e.g. findall) to my action / view and everything is fine es it already was under the category-controller.