Hi Friends,
I want to select all the planar faces in a part. But if a part(for example, a ball) has no planar, there is an error message shows "selection is failed, please reselect.(error 301)".
My codes as below:
Code:
(use-package :oli)
(sd-defdialog 'aaaaaaaaaaaaaa
:Dialog-title "selection test"
:toolbox-button t
:variables '(
("selection test")
(part :value-type :part
;:multiple-items t
:modifies nil
:modifies :contents
:prompt-text "Specify parts"
:title "parts"
:initial-value nil
:after-input
(planar_select part)
) ;end parts
)
:local-functions
'(
(planar_select (pt)
(sd-call-cmds (get_selection :focus_type *sd-plane-seltype*
:select
:selected_part pt
:all_3d
)
)
) ;planar face select
);; local-functions
);;sd-defdialog
From the help file:
Code:
Return Value:
item {SEL_ITEM}
if single_selection was set and an object was successfully selected.
items {LIST of SEL_ITEMs}
if the parameter single_selection was not given and one or more objects were successfully selected.
nil - if no objects were selected
Is there anyway to make the return value just "nil" without this error?
Regards,
Andy
[Diese Nachricht wurde von Andylau am 16. Jul. 2021 editiert.]
[Diese Nachricht wurde von Andylau am 16. Jul. 2021 editiert.]
[Diese Nachricht wurde von Andylau am 16. Jul. 2021 editiert.]
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP