I am experiencing an issue with the search functionality of the Model Structure Panel. As a reference, I also tested my models using this configuration: https://github.com/wallabyway/federatedmodels-v7
I have two models loaded in the scene, A and B. A has one component called Columns. I open the model structure panel, type Columns, and hit enter. The model structure panel shows that all components, besides Columns, are hidden. HOWEVER, what actually happens in the viewer is that all components of A, besides Columns, are hidden BUT all of model B is still visible, even though the model structure panel shows that it should be hidden.
Is this expected behavior? Am I missing something in the configuration of the viewer that I should be doing?
If there is anything specific that needs to be done to support this workflow, please let me know.
Good catch, Rachel. This is a bug in the viewer. I've been able to reproduce it, too, and will report it to the viewer team. Please stay tuned to the viewer changelog to check when it's fixed.
Related
The functionality I seek is very similar to the default ModelStructurePanel model browser, except that I need to list only a subset of elements, by passing a list of dbIds of the elements I want listed. By clicking on an element on that list, have the view focus on that element.
I figure there might be two ways of achieving this by using the ModelStructurePanel (although I'm open to using something else):
Creating a new instanceTree with only the specified elements, then doing something like viewer.modelstructure.setModel(newInstanceTree)
Overwriting the ModelStructurePanel.shouldInclude method to hide all elements but the specified ones.
I have googled for Viewer code boilerplate that would provide this functionality, but have not found it. Any help is very much appreciated.
There is a basic sample here very close to what you described, and I would go with customizing just one action instead create a new one, seems easier.
Using the viewer, we can interact with the model browser to change the selection resolution in order to see different properties about a selected component. However, for most of our users, this is incredibly unintuitive. Is there a programmatic way to set the selection resolution used by the viewer's built in properties window so that we can control what properties are displayed when a user selects a component in the viewer? Or maybe there is a better way that is intended to allow developers to control which properties are shown within the viewer's built in properties window?
You can build your own property panel that will allow you to pass in the desired properties you want your users to see. I have done this in a sample listed below, where I populate in a separate table, not using the Viewer Toolbar, the different categories for the properties of the model. Try the Revit House model.
https://viewer-rocks.autodesk.io/
Also here is another demo where a Meta-properties panel got built that even allows you to modify the properties, remove, add new ones to that panel.
https://forge-rcdb.autodesk.io/configurator?id=5904729b0007f5ead5b1196d
You can see both source projects from Github.
We have built custom state saving functionality into our web app, based largely on the "Screenshot Manager" extension that Philippe created. We are having an issue with selection, wherein some components that where hidden when the state was saved are being shown when the state is loaded. I have replicated it on viewer.autodesk.io with the vanilla states manager code.
To be precise, components already visible in the viewer that are hidden by CTRL-clicking them on the model browser initially disappear in the viewer. However, when you save this state and then recall the state at a later time, the components hidden in this way re-appear.
Can you please investigate - is this a bug in the states manager code (we had a look but can't find it - the hidden components are being recorded in the state) or in the viewer itself?
Thanks,
Chris
I check what happen when you select components, those 2 states are incompatible: the child gets hidden but the parent gets isolated, hence it is displaying all its children and hide the rest of the components in the model.
In order to get the behavior you "would" expect, you would need to hide all components without isolating the parent sub-assemlbly, then create your first state, then hide the child, create your second state. You may achieve that by writing your handler when clicking a browser node. For that you would need to implement your own ModelStructurePanel.
I've got a basic example which can help you getting started:
ModelStructurePanel
I will take a look at the click handler and add an example there. For the time being, you can check in the source of the viewer3D.js which methods you need to overwrite.
Hope that helps
I created a Qt4 Gui application. I have the main window. I put a QStackedWidget and two QPushButtons on the MainWindow's central widget. I am using QtCreator as my IDE.
In the attached image the shown stacked widget has two pages and the two pushButtons 1 and 2 are for navigation to firstPage and SecondPage of the stacked widget respectively.
Problem 1:
When I opened signal/slot editor I selected sender=button1 and signal=clicked, then receiver=stackedWidget and slot=? . It supposed to be setCurrentIndex() but its not listed in the drop down list.
Problem 2:
In the right object panel of QtCreator there is marked the "Denied Symbols". I don't know why those symbols are there? Is there any problem ?
I am attaching the screenshot below. If any more details are required please let me know.
I too am learning QT and QT Designer, and ran into the same problem. A determined search of the Internet revealed several other people with the same question, and no answers. You'd think someone out there would have explained it by now. Sigh.
Anyway, the problem is that the signals sent by the push-buttons don't match the signature of the "setCurrentIndex(int)" slot on the stacked-widget, so "setCurrentIndex(int)" doesn't show up in the menu when one tries to use a push-button "clicked()" signal. That is, "clicked()" has no parameters, and "setCurrentIndex(int)" has a single integer parameter, therefore they have different signatures.
In my project, I was trying to connect menu items to a stacked widget, so that one of the contained widgets would be displayed when the menu item was selected. The menu items only have the "triggered()" signal, there's no "triggered(int)" signal, and QStackedWidget's "setCurrentIndex(int)" slot is expecting a signal that has a single integer parameter in its signature.
In other words, you can't do what you want, directly.
Here's how I solved it in my code. Keep in mind that I'm writing my Qt app in C#, using MonoDevelop (to do C# development under Linux) and Qyoto (which is a C# interface to Qt).
After creating my main window (and assiging it to a variable called "layout"), I did this:
QObject.Connect (layout.someMenuItem, SIGNAL("triggered()"), showSomeView);
This causes my menu item to call the showSomeView() function whenever it's triggered.
I then wrote
public void showSomeView()
{
layout.stackedWidget.SetCurrentWidget(layout.someView);
}
Now it does what I mean!
The solution in your project's language should be similar to this. It's unfortunate that the signal/slot connections have to be set up in code, instead of in QT Designer's GUI, but I don't know how else to do it.
My current job is updating an existing Access97-Project. I haven't worked with Access in a long time and i can't find out, how i can explore a toolbar called "sbmbDrucken" which is obviously user-created. I just need access to the action or the code which is called by the buttons...
Is there any menu entry i missed or do i need special code for self-inspection?
TIA!
There are three different ways for menus/toolbars to be instantiated:
the old way, using macros. Before A95, this was the only way, so a lot of older apps (i.e., those converted from earlier versions) may still use macros for the menus.
defining them by hand, using the CUSTOMIZE function that you get when you right click on a toolbar in Access.
in code, using the Application.Commandbar object.
For the first you can browse your macros and see if any of them are menu macros.
For the last, you can do a search in the code for CommandBar.
For the second, just look at them through the built-in menu customization tools. Keep in mind that you may have to check them off to get them to be visible, and that the list is in no rational order. Likewise, some menus/toolbars are hidden from the customization interface. Also, you might need to look at the CUSTOM toolbar menu item.
I don't have Access 97 on hand but you may take a look of this webpage: http://www.alvechurchdata.co.uk/hints-and-tips/accaddtoolbar.html
It seems that "user-created" toolbars could be defined by handwritten code at form.load or somewhere similar. You may search CommandBars.Add and see if you can find those relevant code segments.
Hope that helps.
In the design mode, you will be able to see the toolbar & actions assigned to each of the button.
Right click on the specific toolbar
Click on Customize...
Right click on the button you would like to edit the action of.
You will be able to see the action (which could either be macro or code).
Let me know, if that doesn't help at all.