# Command Parameters

**URL:** <https://discourse.mcneel.com/t/command-parameters/41071>\
**Category:** Developer\
**Created:** [February 6, 2017, 10:34am UTC](https://discourse.mcneel.com/t/command-parameters/41071 "2017-02-06T10:34:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![henrydm](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/henrydm/32/78092_2.png) [@henrydm](https://discourse.mcneel.com/u/henrydm)\
**Post date:** [February 6, 2017, 10:34am UTC](https://discourse.mcneel.com/t/command-parameters/41071/1 "2017-02-06T10:34:21Z")

</div>

Hello,

Is there a way to intercept the command parameters pairs in Rhino 6? for instance, if the user uses Sweep2 get somethinmg like that:

[Rail1:6c9f1ccb-8763-4cbb-8803-ef8f57da6b] \<- Which is curve Id;  
[Rail2:6c9f1ccb-8763-4cbb-8803-ef8f57da6b]  
[Profile1:6c9f1ccb-8763-4cbb-8803-ef8f57da6b]  
[Profile2:6c9f1ccb-8763-4cbb-8803-ef8f57da6b]  
[MantainHeight:true]  
[etc …]

Thanks in advance

---

<div class="post-metadata">

**Author:** ![dale](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/dale/32/772741_2.png) [@dale](https://discourse.mcneel.com/u/dale)\
**Post date:** [February 6, 2017, 4:59pm UTC](https://discourse.mcneel.com/t/command-parameters/41071/2 "2017-02-06T16:59:25Z")

</div>

> [@henrydm](#):
>
> intercept the command parameters…

Hi Henry,

Can you give us a better idea what problem you are trying to solve?

Thanks,

– Dale

---

<div class="post-metadata">

**Author:** ![henrydm](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/henrydm/32/78092_2.png) [@henrydm](https://discourse.mcneel.com/u/henrydm)\
**Post date:** [February 6, 2017, 5:10pm UTC](https://discourse.mcneel.com/t/command-parameters/41071/3 "2017-02-06T17:10:45Z")

</div>

Hi Dale,

I register OnBeginCommand and OnEndCommand to intercept boolean commands (Union, Difference, Split and Intersection).

In OnBeginCommand I store the current objects in the document, and I do it the same OnEndCommand, comparing these lists you can know which are the new objects (generated by the boolean command) and which are involved in the boolean operation (objects that are not present when the command ends) but I only can reproduce commutative boolean operations (Union and Intersection) because I don’t know which objects belong to “First group” or “Second Group = objects to subtract with” Furthermore if the user set the parameter “Delete Input objects” to “yes” in boolean difference command, the comparison method doesn’t work anymore.

Thanks and best regards.

---

<div class="post-metadata">

**Author:** ![henrydm](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/henrydm/32/78092_2.png) [@henrydm](https://discourse.mcneel.com/u/henrydm)\
**Post date:** [February 8, 2017, 3:27pm UTC](https://discourse.mcneel.com/t/command-parameters/41071/4 "2017-02-08T15:27:05Z")

</div>

So do you think is it possible?

Thanks and best regards.

---

<div class="post-metadata">

**Author:** ![dale](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/dale/32/772741_2.png) [@dale](https://discourse.mcneel.com/u/dale)\
**Post date:** [February 8, 2017, 11:38pm UTC](https://discourse.mcneel.com/t/command-parameters/41071/5 "2017-02-08T23:38:25Z")

</div>

I don’t know of a way you’re going to be able to determine hat object are part of the first or second selection group.

Again, why is this important to you?
