CANVAS fashion I_DIALOG / I_PALETTE crazy!

Balises:

A crazy story that I do not understand!
I want to have my red square goes green when I click on it.

With "I_DIALOG" it works well (e.g. "dialog_test")

I made the same mode 'I_PALETTE' see the 'palette_test' example, but this time above the square does not green?
The strange and that is why in sight 'smartpart editor' it works well! But in production longer?

There must be something that I did not fully understand.

Another problem with the "I_PALETTE" mode, if I set a 'CANVAS' wider than it is tall, it is reduced in height and have exploitable,

Example "palette_test", if you change the line:
I_CANVAS 0, 0, 120, 122
By
I_CANVAS 0, 0, 120, 119
You will see that it will be necessary to enlarge the mouse of the CANVAS area to see the square, it is very unpleasant because sometimes there is not the choice to have a wider CANVAS.
I already reported this problem to the support, but obviously they have not understood the problem.
(Allplan 2014-1-2 / I5 750 / Nvidia GTX 660 / 12 g ram)

Administrateur forum : Allplan.leforum.eu

http://allplan.leforum.eu

Olivier1

Pièces-jointes (3)

Type: application/octet-stream
Téléchargé 980 fois
Size: 7,76 KiB
Type: application/octet-stream
Téléchargé 988 fois
Size: 7,77 KiB
Type: image/png
Téléchargé 340 fois
Size: 49,76 KiB

BRAVO !!! toujours à la pointe de la technologie. Je cherchais à faire celà mais je ne trouvais pas de tuto. Et la, je tombe sur cette page et je ne suis pas étonné que l'auteur soit Olivier1 Je regarde ça. Bonne journée

Jf

Hi Olivier,

the first and essential mistake is, to have the statement

IF GLOB_UI_BUTTON_ID = evt_sel_fld THEN
...
ENDIF

inside the dialog script!

Put this into Parameter script, and change a Parameter e.g. "col":

IF GLOB_UI_BUTTON_ID = evt_sel_fld THEN
col=1
PARAMETERS col=col
ENDIF

Then you can do this in the Dialog script:

IF col=0 THEN
I_COLOR 44 , 234 , 75
ENDIF
IF col=1 THEN
I_COLOR 234 , 84 , 44
ENDIF

..and all works fine!

The call of dialog script is different palette-mode!
Thats why it works with the dialog...

Regards Jörg

voici comment j'ai fais :

Dans ton script de paramètres tu as :

FOR i=1 TO 8
IF GLOB_UI_BUTTON_ID = i THEN PARAMETERS carre= i
NEXT i

Dans ton script de boite deialogue :
paramètre :
- montant_ep1 = épaisseur du montant 1 (nombre entier)
- carre = numéro du carré (ID de la sélection)(nombre entier)

I_DIALOG "Menuiserie"
I_PEN montant_ep1

I_ROW "test2" , 1
I_CANVAS 0 , y1 , REF_X*100 , REF_Z*100

IF carre = 1 THEN
I_COLOR 255 , 0 , 0
ELSE
I_COLOR 0, 0, 0
ENDIF

I_RECT 0 , 0 , REF_X*100 , REF_Z*100 , 1

IF carre = 2 THEN
I_COLOR 255 , 0 , 0
ELSE
I_COLOR 0 , 0 , 0
ENDIF

I_RECT montant_ep1 , montant_ep1 , REF_X*100-2*montant_ep1 , REF_Z*100-2*montant_ep1 , 2

I_CANVAS_END
I_ROW_END

Avec ceci, tu va avoir tes cadres/traits qui vont changer d'épaisseur et changer de dimension en fonction de la largeur et la hauteur en fonction de ta menuiserie. Par contre ton carré n'es pas redimensionnable mais tu peux toujours zoomer. Si tu veux que ton carré se redimensionne, tu es obligé d'utiliser la fonction I_PALETTE.(Mais normalement tu n'as pas besoin de zoomer vu que ton cadre s'étire aussi)
Comme tu dois savoir, le "problème" de I_DIALOGUE, c'est que tu es en mode "fenêtre" et pas en mode "menu" comme par exemple les smartparts d'allplan 2015. Tu dois donc appuyer sur ok ou appliquer pour valider ou quitter "la fenêtre" de la smartpart et la dimension de "la fenêtre" est figé .
Le problème de la I_PALETTE, c'est que tous tes textes seront sur la droite et que tu ne peux pas utiliser la fonction "I_OUTFIELD" et que la mise en page est bizarre (mon avis personnel)

En espérant que ceci puisse t'aider. Bonne journée.

Jf


https://campus.allplan.com/ utilise des cookies  -  Plus d'informations

Accepter