How to select multiple layers in Meshlab - mesh

I have 20 layers of obj files. I want to set part of them visible while others invisible.
It's not convenient to set it one by one. Is there a easy way to select multiple layers at the same time and change their visibility.

Yes. You can use the 'SubString match' parameter under 'Change visibility of layer(s)'.
For example, if your files are named mesh-01.obj to mesh-20.obj, you could use a 'SubString match' value of 'mesh-0' to target files 1 to 9 etc

This keyboard shortcut may do the trick:
Press control/command + the eye button on some layer, and it will toggle visibility for all other layers

Related

Visio VBA Toggle Buttons and better ways

second question here, and I'll start with the obvious, I'm not a coder, just and enthusiastic ammateur! Thanks for your patience with my incorrect terminology etc!
I have a grid of Layers on a Visio document that I make visible/invisible using ToggleButtons. Imagine an 8 x 8 grid, with each square a box on it's own layer that becomes "highlighted" when the equivalent button is pressed. A-H, 1-8.
At the moment this means creating 64 individual subs:
Private Sub A4_Click()
Dim LyrNum As Integer
LyrNum = A4.Data1
If A4 Then
Call ToggleLayer3(LyrNum, 1)
A4.BackColor = RGB(243, 226, 160)
Else
Call ToggleLayer3(LyrNum, 0)
A4.BackColor = RGB(129, 133, 219)
Where the Data1 Property field contains the Layer Number for the grid reference.
I guess my first question is, is this really the best way of doing this? Seems a but clunky, but perhaps anything more elegant might be beyond me!
...
Second question, When horizontally adjacent layers are selected, I'd like to "mask" the join - essentially hide the lines between the boxes (they're a bit more complicated that straight squares). I have something that's starting to work, but again seems clunky and pretty labour intensive to set up.
I've made the Data2 Property Field the Layer numbers for the boxes to the left and right of the clicked layer (split by delimiter), and the Data3 Property Field the layer number for the "Masking". I can then split Data2 call a sub with (ClickedLayer, LayerBefore, LayerAfter, MaskingLayer, OnOff) and use If loops to see if the layer to the left is visible, and if so add the masking etc.
Means manually entering all the layer info into the property fields of each button etc, but works I guess.
I'm 100% sure there's a better way - I tried making the masking a object in the layer with a ShapeData of visible: True/False that could be changed from VBA, but that boggled my brain a bit. I guess I could have an Array of values in the VBA with the info I'm putting into Property Data# fields.
Thanks in advance for your help
Steve

Colors[4] not showing color selection on Front Panel

I am trying to set the color of an indicator to different colors based on different values, like 1 = red, 2 = blue etc. Using guidance from a Youtube video (accessible using this link: https://www.youtube.com/watch?v=czUmPQmKmGU), I have created a Colors[4] control for the indicator I have after changing it to the "write" function.
The Problem on the front panel is that I am getting a control with numbers instead of a color box where I can select the colors to show based on the value. This was the control I got instead.
This is the control I am trying to achieve (below):
Is there any way that I can get the color box on my control instead of the number controls? I am not sure if it can be changed through a control on the front panel or something but what I have tried so far keeps leading me back to this problem.
Any advice is much appreciated
A color box control is just a U32 number (three bytes for RGB and one which is always 0), which is why that's what you get.
There is a right click plugin which adds a replace with color box option directly to the right click menu of unsigned 32 bit numbers, but I don't remember if it ships with LV or not.
If you don't have that, you can always just right click the indicator inside the cluster, select replace and navigate the palettes to find the color box. You can also copy a color box and then select the indicator and paste, which replaces the selected control.
The color[4] is actually an array of 4 colors (UInt32 as Yair said), that define 2 color gradients, one for the 'Off' state, and the other for the 'On' State of the control.
If you want to set the control's color, you will have to define all 4 of them.

PowerPoint VBA add shape event/ add shape with tag value

i'am currently trying to add a small function to PowerPoint using VBA, my goal is to create a gadget that works kind of like Photoshop graphics layer.
My plan is to add a layer name Tag on each shape that is drawn by user, so later I can parse through every item by loop and preform lock/unlock, show/hide shapes based on it's tag value, such as:
Sub add_shape_with_layer_tag()
Set islide = ActivePresentation.Slides(1)
Set ishape = islide.Shapes.AddShape(msoShapeRectangle, 5, 5, 80, 60)
ishape.Tags.Add "Layer", "1"
End Sub
Sub show_hide_layer_one_shapes()
Dim active_slide As Slide
Set active_slide = ActiveWindow.View.Slide
For Each ishape In active_slide.Shapes
If ishape.Tags("Layer") = "1" Then
ishape.Visible = Not (ishape.Visible)
End If
Next ishape
End Sub
However, I couldn't found a way to achieve this, so I would like to ask whether there's a method that provides following functions?
override add shape function so I can sneak tag value in to shape every time user drawn a shape
catch add shape event (if this thing did exist) so i can add tag to the last added item
a way to set a default tag value to shape, just like setting default shape color/line width
or is there any better options that is also viable?
thanks.
20200728
To John, thanks for the advice, I did found some interesting event that might be helpful for some of my other projects, however I couldn't found events that able to trigger after custom function while shape is added.
To Steve, my plan is to add a modeless userform with list UI that manage layers, the shape tag and shape fill texture/color will be determined based on what list item that currently selected.
As to saving settings, I'll use VBComponents.CodeModule to dump existing settings in userforms to a VBA module and store as text, so in theory I should able to make this function self contained in one file.
Not totally an answer, sorry SO, but comments don't allow enough scope for this. So ...
To Steve, my plan is to add a modeless userform with list UI that manage layers, the shape tag and shape fill texture/color will be determined based on what list item that currently selected.
Ah, so you're creating your own "pseudo-layers". That wasn't clear. Thanks for the add'l info. As it happens, I have a selection manager add-in that works very similarly to what you're proposing.
To John, thanks for the advice, I did found some interesting event that might be helpful for some of my other projects, however I couldn't found events that able to trigger after custom function while shape is added.
The SelectionChange event should get you there. When it fires, you'll need to check first to see if the current selection is a shape or something else. If a shape, check to see if its .Index = current slide's .Shapes.Count and also to see if you've already tagged it. If no tag AND if it's the correct index, it'll be a newly added shape. If you're tagging ALL shapes, you may only need to check to see if the .Tag(name) is blank.
As to saving settings, I'll use VBComponents.CodeModule to dump existing settings in userforms to a VBA module and store as text, so in theory I should able to make this function self contained in one file.
Why not save any needed slide or presentation level info as further slide- or presentation-level tags? PPT can absorb quite a lot of info as tags w/o getting cranky.

Selecting the Path objects on multiple Area Types

I have about 60 "text boxes" (area type objects) and would like to simultaneously adjust their background colors.
This can be done manually by using the Direct Select tool, and shift-clicking the edges of several Area Type objects, then adjusting their fill property.
This workflow is tedious, however, because I can't group these path objects - and thus a single mis-click means I need to redo a lot of meticulous shift-clicking. Is there a way to explicity select all of these path objects? Selection -> Object -> same type selects the Area Texts, not their nested path object.
Grumble, thanks for any insight.
Select all Area Type objects, move them to a new Layer, make other layers invisible and then select all the shapes by the Direct Select tool with no shift
I figured it out.. very unintuitive. Here's how:
Select > Object > All Area Type Objects
Object > Expand Appearance (this was the key step)
Now the Area Types and their background shapes were 'separated'. Next:
Select > Object > All Area Type Objects
Select > Inverse
And now I had all of the shape objects selected, without their Area Types.
I was able to save this selection (via Select > Save Selection), and upon re-choosing this saved selection, only the shapes were selected, not their Area Types.

How to reposition non reliative multiple labels of edges in JGraphX

In a graph, I have edges that have more than one label (multi labels): one label is beside the source cell and another one beside the target cell. Both labels are created as child vertices of the edge. For correct positioning adjustement reasons, these labels do not have their geometry set relative (to the edge). When generating the edges, labels are correctly positionned: I use the mxGraphView.getPerimeterPoint() and an few adjustements to position the source and target labels.
When moving a cell using the mouse drag, I need to reposition these labels. For the moment I have tried to react to graph events (mxEvent.CELLS_MOVED, mxEvent.MOVE_CELLS) or model events (mxEvent.CHANGE) registering either a graph or a model listener.
However, the getPerimeterPoint function uses an mxCellState (not an mxCell) obtained through the graphView (graph.getView().getState(cell)) to do the calculation and this cell state mxGeometry is based on the previous position of the cell.
Is this solution based on events the correct way of doing this?
And if yes, should I rewrite completely the getPerimeterPoint (and functions used in it) to use the mxCell returned by the event (event.getProperties("cells")) whose greometry is correct rather than the mxCellState? Or is there a technique to get the cell state corresponding to the end of the current move operation without messing up the whole graph update process?
Any help or advice appreciated, thanks.