How to highlight exact member information on click of a 3D modal member using javascript - autodesk-forge

I am working on Forge Revit 3D modal.
Rendering a 3D modal based on URNSourceFile.
Problem Statement :
We have a GUID (like "ad6dd74d-c919-432a-8404-0a17b7659df4") for all the members of the modal.
We have a table(not part of forge), in which all the members information including GUID is set.
We have a scenario like, On click of a member(beam) from the modal we need to highlight exact match row of GUID from the table.
Table List of rows is not part of forge viewer.
Please suggest on triggering point on click of a member(beam) to highlight a member row.
Please find the attached screenshot for the reference.
Screenshot

Once you know the ID of the object you want to highlight, you highlight it in different ways, for example, by programmatically selecting it using viewer.select, or giving the object a color tint using viewer.setThemingColor.
To find an object (and its ID), there are also different ways. For example, you can find all objects containing a specific piece of text in their metadata using viewer.search.

Related

Is there a way in Autodesk forge to get entity name with the id that appears in the property panel?

I am trying to get the entire name of a dbId. I am able to get the name using getNodeName() but is there a way to fetch the id as well? I have highlighted the id I need in the image below.
Property panel snapshot:
Since everything you see in the viewer is open source and available through JavaScript, including the property panel that you show in the screen snapshot, the highlighted Revit element id can definitely be accessed. In the worst case, you would simply grab the caption of the property panel window and parse it from that. However, the Revit element id is also accessible from the viewer node properties. It can be extracted from the externalId property, which includes a hex encoding of it. For more details, please refer to the similar previous question on missing Revit ID in instance elements.

Is there an option to filter Revit elements based on a view on forge?

I have multiple 3D views and user can select any views in the forge application to view. here i am trying to get the elements only associated to the selected view. from the view i am able to get the model and all the elements. But i am not able to filter based on the views as Revit do.
Is it possible to filter elements based on the selected view?
Appreciating you help.
Regards,
Durai
Check the __viewable_in__ property of the elements, it should indicate where the given element is visible and allow you, for instance, to navigate to other views, like in this sample.

I need to Click on table cell value of a web page in automation anywhere tool

I am new to Automation Anywhere. I am trying to click on specific cell value of a web page table.
I have cloned the table object and applied action "Click on cell by index" provided by automation anywhere tool on specific row and column.
Secondly, I tried Mouse Click functionality but, on search base position of cell where to click will not always be the same that's why cant implement mouse click.
Screenshot is attached what I have done so far, Nothing happens by click on the cell. I want to click on the value present in the cell.
I want to click on highlighted portion mentioned in below screenshot:
Any kind of help will be appreciated.
Could you attach a screenshot of the full search criteria? I'm sure it has to be something with the path and DomXpath.
Make sure that below points have been checked:
The object properties should be unique and non changing. This is required to identify the object correctly during execution
Check whether object cloning is working properly with current screen resolution. If not, you need to change the screen resolution

Reusable HTML Blocks in Sitecore

I'm looking for a way to create a reusable HTML widget for a website run on Sitecore 8. My original idea was to create a data template that basically consisted of a single Rich Textbox. The idea is that you could drop any number of instances of these widgets on a placeholder and it would render out the HTML from each instance of the widget on the page and in the correct placeholder.
Example:
A content item called /products/my-product is based off of "Product" data template
It consists of some fields on the Product template (maybe product name, price)
I'd like the ability for the content editor to quickly drop one or more instances of the HTML widget on the page (say, in the right rail or in a different placeholder on the sublayout. I know I could just throw a "notes" field on the product template, but I'd like to make it more dynamic so that they can add several instances of this HTML widget and place them anywhere they desire.
I quickly realized that because we need the ability for multiple instances of this widget, a data template was not enough because each instance of the widget would needs its own data to populate on the front. Thus, my idea was to allow the content editor to add HTML widgets as a child of the current item (so each item would have its own instance data). I don't think this will work because I don't know of a way to have these children tell the parent page which placeholder to put them in, so laying them out is a problem.
I also thought about somehow setting the placeholder name as a parameter or field on the data template for the HTML widget, but I couldn't figure out how to get Sitecore to dynamically add them to a placeholder when it glues everything together.
Is there a way to achieve what I'm trying to do? Seems like a reusable HTML (or other kind of widget, for that matter) would be a fairly common need. I feel like there's an easy Sitecore way to handle this that I'm missing and overcomplicating the solution.
From what I understand, you're looking for Datasource field of a component.
Basically you:
Create a data template which contains fields necessary for your component
Create a set of items using that templates
Allow authors to select one of them as the Datasource for your component.
It's built in Sitecore functionality.
Check blog post http://firebreaksice.com/using-the-datasource-field-with-sitecore-sublayouts/ or google for Sitecore datasource.
Other links:
http://www.nonlinearcreations.com/Digital/how-we-think/articles/2014/03/4-patterns-Sitecore-component-development.aspx
http://www.nonlinearcreations.com/Digital/how-we-think/articles/2015/04/Sitecore-templates.aspx
EDIT:
Read about Datasource Location field (defining the repository of datasources location) here: http://www.sitecore.net/learn/blogs/technical-blogs/getting-to-know-sitecore/posts/2011/01/handling-presentation-component-settings.aspx
Read about Datasources and MVC here: http://jockstothecore.com/sitecore-mvc-item-maze/

Displaying blog entries with identical google maps

You can see my problem here:link deleted
Basically I can not display the full text of my posts on the front page because the maps will conflict.
These are the expanded posts that right now I am displaying as collapse on my front page
link deleted
link deleted
As soon as I display them expanded the maps overlap
Changing the map name variable in the code does not solve the problem, neither changing the name of the where I display the maps (right now they are the same but I tried that)
Question: I do realize that when I display two maps on the same page there will be two "iniktialize" functions. Also the two pages have identical java script function names. How do I deal with these ?
I do realize that when I display two maps on the same page there will be two "iniktialize" functions. Also the two pages have identical java script function names. How do I deal with these ?
You can't have multiple functions with the same name (the browser will pick one version and us it, different browsers might pick different versions). Either give them different names, or if they do the same thing with different data, use the parameters passed in to give you the unique behavior.