Hi.
I am having trouble in making a macro that verify if the user select part of a boundary like is shown in the picture.
I know the code that verify if the user selects surfaces:
INT count = 0
FOREACH surf in folder('model') {
$count = $count + number_selected(surf.Components)
}
IF $count == 0 {
MESSAGE INFO "Nao existe nenhuma superficie selecionada."
RETURN
}
But i can´t change it to a selected Boundary.
Can someone help.
IF number_selected(entity("Boundary", "")) <= 0 {
MESSAGE WARN "Nao existe segmento selecionado."
MACRO ABORT
}
Rafael Sansão
Hi.
The command "number_selected(entity("Boundary", "")) <= 0" don´t work.
It gives a Macro Error: Can´t evaluate expression
I am working with PowerMill 2015.
Try it with single quotes:
IF number_selected(entity('Boundary', '')) <= 0 {
MESSAGE WARN "Nao existe segmento selecionado."
MACRO ABORT
}
Hi.
Still doesn´t work.
Maybe is like you said.
Don´t work with PowerMill 2015.
But thanks anyway.
I just try it in another computer in my company, with PowerMill 2022.
The code work.
Can't find what you're looking for? Ask the community or share your knowledge.