Support Forum

[Frage] [PythonParts] ExcludeIdentical [Gelöst]

Schlagworte:
  • PythonPart Parameter Update

Hi,

I want to exclude some parameters on a standard PythonPart for the updates (for example the "Quantity" parameter).

So, I tried ExcludeIdentical like here :

<Parameter>
				<Name>Quantity</Name>
				<Text>Quantité</Text>
				<Value>0</Value>
				<ValueType>Integer</ValueType>
				<Enable>False</Enable>
				<ExcludeIdentical>True</ExcludeIdentical>
			</Parameter>

But I'm a little confused for what to include into the .py file...

Best Regards

Lösung anzeigen Lösung verbergen

Ah, now I know, where the doubts comes from.

In the example there is an angle parameter which affects the position of a geometry included in the PythonPart. In the example, a 3d transformation matrix is generated to describe this rotation.

The sentence refers to the fact, that this matrix must be included in the local placement matrix of the PythonPart, instead of being applied directly on the geometry. This will rotate the whole PythonPart container by the angle, instead of rotating the geometry inside the PythonPart container, which is not what we wanted to achieve in the example

Hi,
I don't really know, what you would like to achieve, so I don't know, what do you have to include in the script.

When you add this tag to a parameter, the PythonPart framework will ignore this parameter when generating a hash value. The hash is appended as an attribute @607@ to every PythonPart (you cannot see it in the Attributes window but it's there). PythonParts with the same parameters become the same hash, thus they are considered as identical.

I would say, you don't need to implement anything in the script, but you may specify, what do you want to achieve.

This sentence in the documentation made me doubt :

In addition, the local transformation of the PythonPart e.g., by the rotation angles, must be included in a local placement matrix of the PythonPart.

So, In my case I just want to exclude some integers or checkbox.

This <ExcludeIdentical> field only seems to work with PythonPartUtil

Some of my older scripts still use :

from PythonPart import View2D3D, View2D, View3D, PythonPart

and they don't look like to be affected

Ah, now I know, where the doubts comes from.

In the example there is an angle parameter which affects the position of a geometry included in the PythonPart. In the example, a 3d transformation matrix is generated to describe this rotation.

The sentence refers to the fact, that this matrix must be included in the local placement matrix of the PythonPart, instead of being applied directly on the geometry. This will rotate the whole PythonPart container by the angle, instead of rotating the geometry inside the PythonPart container, which is not what we wanted to achieve in the example

Thanks for the clarifications

The more I advance, the more I discover options offering even more possibilities

loving this API