Farbzuweisung funktioniert nicht [Solved]

Tags:
  • Smartparts
  • Plugin-Download

Hallo,

ich möchte einem 3D-Körper die Allplan Farbe mit der ID-Nummer 12 zuordnen.
Konkret mache ich es mit dem Befehl : color 12
Dies funktioniert für die 2D-Ansicht des Bauteiles, aber in der 3D-Ansicht ist das Bauteil weiterhin weiß.

Weiß vielleicht jemand wo hier mein Fehler oder das Problem liegt?

Beste Grüße

Attachments (1)

Type: image/jpeg
Downloaded 20 times
Size: 18,40 KiB

Show solution Hide solution

Die Oberfläche für Farbe 12 kann "umdefiniert" sein.
Zum Zurücksetzen s. Screenshot

Attachments (1)

Type: image/png
Downloaded 47 times
Size: 79,57 KiB
1 - 10 (12)

Hello,
Maybe, a "surface" (Oberfläche) is applied on this object...


Hallo Bertrand,

danke für deine Antwort. Leider kann ich mit deiner Antwort nicht so viel anfangen.

BTW die Farbzuweisung funktioniert mit anderen ID´s (z.B. mit 4,5 & 8 ).

If I have well understood your issue, click right on the object and select the function "Freie Oberflächen an 3D-, Ar-Elemente zuweisen" (see online help).
Unselect the surface applied on the object (see the first "Hinweis" of the help above for that) and you can apply what you want.

Are-you sure that the color 12 doesn't have already a surface applied?


Ah, you didn´t get me right. I scripted a SmartPart myself. In the dialog you can choose which type the object is. Depending on the type the object has a different color.

For example: If the type is "Mischluft" then the color applied to the object has the ID Nr.5 (pink)
If the type is "Fortluft" then the ID is Nr.12 (brown)

It works with the other colors, but somehow it doesn´t work with the Color ID 12..

Try something like that : COLOR ROUND_INT ( your_color )
Internal calculations of SmartParts gives sometimes something "special".
Sometime ago, I got this : I have two variables with the same value 0.45. When I make a test "IF val1 = val2", the result was "False"!
To get the right result, I had to code something like that :
IF ROUND_INT ( val1 * 10000 ) = ROUND_INT ( val2 * 10000 ) THEN...


Die Oberfläche für Farbe 12 kann "umdefiniert" sein.
Zum Zurücksetzen s. Screenshot

Attachments (1)

Type: image/png
Downloaded 47 times
Size: 79,57 KiB

@ Bertrand

Compare double values direct without tolerance is never a good idea!
That has nothing to do with special behaviour of SmartParts!
The value of 0.45 is internally stored as a floating point number in dual system. So it might be, that internally only 0.044599923483 can stored, because that is the dual system number! And: the value are only shown with rounding!
So if a result of 0.45 is shown, it can also be 0.044599923484 is meant!

tol=0.0001
val=0.45
IF ABS(val-0.45) < tol THEN ...

Attachments (1)

Type: image/png
Downloaded 9 times
Size: 12,33 KiB

Yes, you're right...
But in my case, it is not exactly what you explain.
I created 2 arrays with values I defined "manually" (aval[1]=0.40 ; aval[2]=0.45 ; aval[3]=0.50 ; etc.).
So, it seems that it is not rounding because I assigned each value line by line.
If I compare the value 0.30 to another value 0.30, it's ok. It's also ok with 0.50, 0.55, 0.60... But when I compared 0.45 to 0.45, I got this trouble.
In the same idea, I created an array with values as before.
In the dialog (palette), I converted these values from arrays to strings to make a combobox.
In Allplan 2014, for the value 1.15, I got "1.14" but in Allplan 2015 to 2020, with the same SmartPart, I got 1.15...

So, i'm not so sure that "That has nothing to do with special behaviour of SmartParts!" as you said.
It's not a judgment, it's a statement. I adapt and continue my work...


Optionen? Haken bei Farbe zeigt Stift raus?

Software: Allplan, Lumion, OM by Cycot, Simplebim, Nevaris...
Coachings unter http://www.cycot.de / Tutorials unter http://www.allplanlernen.de

Attachments (1)

Type: image/jpeg
Downloaded 30 times
Size: 76,05 KiB
1 - 10 (12)