ajitspyd
ajitspyd

Reputation: 1274

Autodesk-forge's "Visual Cluster" extension on NWD files

I'm trying the "Visual Cluster" extension in a forge-based app. It seems to be working fine with RVT files but it's not clustering at all for NWC/NWD files.

Do Autodesk-Forge support visual clusters on NWC/NWD files?

You can try uploading NWC/NWD files here https://forge-extensions.autodesk.io/ and enable VisualClusters extension.

Upvotes: 0

Views: 300

Answers (2)

Joshua Lumley
Joshua Lumley

Reputation: 71

Thank you this is just what I needed. But it needs to be clarified that 'attribName' is NOT available via postman...It is only available via code:

var selection = viewer.getSelection();
if (selection.length == 0) { return;
} 

viewer.getProperties(selection[0], function (result) {
  const props = result.properties;

  var attribNameArray = [];

  for (let i = 0; i < props.length; i++) {
    const property = props[i];
    attribNameArray.push(property.attributeName);
  }
  //turn array into string with new lines
  var attribNameString = attribNameArray.join('\n');
  alert(attribNameString);
});

Upvotes: 0

Eason Kang
Eason Kang

Reputation: 7070

The Autodesk.VisualClusters extension uses attributeName of the object properties for cataloging, and its default value is Revit Category.

If you want to change the default value, you need to pass an option called attribName to change it. For example, we changed it to use Material for cataloging.

Note. By default, it will search leaf nodes' properties. If you want to group by parent nodes, you need to set the option searchAncestors to true.

viewer.loadExtension('Autodesk.VisualClusters', { attribName: 'Material', searchAncestors: true });

Here is an example for NWD/NWC files (tests with v7.58):

viewer.loadExtension('Autodesk.VisualClusters', { attribName: 'LcRevitMaterialProperties:LcOaSceneBaseUserName' });

enter image description here enter image description here

Upvotes: 1

Related Questions