Das Wissen aller Anwender nutzen

Im Allplan Connect Forum tauschen sich Anwender aus, geben wertvolle Tipps oder beraten sich bei ganz konkreten Aufgabenstellungen − auch international.
Und damit wirklich keine Frage unbeantwortet bleibt, unterstützen die Mitarbeiter des Technischen Supports ebenfalls aktiv das Forum.

Es erwarten Sie:

  • Foren-Vielfalt aus CAD Architektur, CAD Ingenieurbau uvm.
  • Tipps von User für User
  • international: Deutsch, Englisch, Italienisch, Französisch und Tschechisch

Melden Sie sich jetzt an und diskutieren Sie mit!

Zur Registrierung

SmartParts: Priority display sequence, Constructon lines


Hi everybody,

I have some questions about smartparts language:
- Are there any command to control the priority for the display sequence in 2D?
- Are there any command to create "construcion lines" (hilfskonstruktion)?
- How do you use the global commands like "glob_layer", "glob_scale", etc..?

Thanks a lot!
Xavi

Xavier Coll • Architect, Project Manager I+D, BIM Manager, BIM Auditor
EiPM • http://www.eipm.es/en/

11 - 20 (31)

Hi,

we know the problem's of SmartParts inside openings, and we working on it...

Jörg

Don't worry mpm990! the forum is for everyone to discuss questions and solutions :-)

Jörg, I have another question... sorry! ;-D
(i'm sure... this not will be the last question...)

QUESTION 7: TEXT I'm creating a bath, and I create it a text, that will be showed in the draw after inserted this smartpart. This text is the width and length of the bath, and is in m. How to change the lenght of numbers after the flotain point?

DEFINE STYLE "text_1" arial , 0.7 , 8 , 1
STYLE text_1
TEXT2 REF_X / 2 , 0.005 , "x" !-----Symbol
TEXT2 REF_X / 2 - 0.08 , 0.005 , REF_X !-----Width
TEXT2 REF_X / 2 + 0.08 , 0.005 , REF_Y !-----Length

Thanks, Jörg!
Xavi

Xavier Coll • Architect, Project Manager I+D, BIM Manager, BIM Auditor
EiPM • http://www.eipm.es/en/

Anhänge (1)

Typ: image/jpeg
328-mal heruntergeladen
Größe: 292,67 KiB

Hello

try this command, "% 2". 2 gives the number of decimal after the comma

and you few together on a single line the dimension of your bath :

TEXT2 ref_x/2 , 0.005 , STR ( "%.2" , REF_X ) + "X" + STR ( "%.2" , REF_Y )

Administrateur forum : Allplan.leforum.eu

http://allplan.leforum.eu

Olivier1

It works perfectly... thanks mpm990!! :-)

Are there any parameter to avoid that the text scaled automatically when I change the "Reference Scale" (BezugsmaBstab) of the drawing?

Xavier Coll • Architect, Project Manager I+D, BIM Manager, BIM Auditor
EiPM • http://www.eipm.es/en/

Hi,
...no, if you want to have constant text height, you can use different foils for that.
The text height is always in mm on display / plan.
It's no possibility to create text with constant height inside Allplan.
It depends always on the scale.

But you can modify with property palette to constant height (s. constant_text.png)

Jörg

Anhänge (1)

Typ: image/png
350-mal heruntergeladen
Größe: 38,00 KiB

Nice tip Jörg! After more than 10 years using Allplan, there are things that I'm still learning :-)

I'm trying to assign foils for the text inside my SmartPart, but something strange is happening. After doing the modification, and with the "Reference scale" set to 1:50, the text disappear of the Smartpart, and the smartpart is unable to be selected (only can be selected doing a selection window). It's very strange

This is my script:

REF_HANDLES
GOSUB "Foil_definition_2D"

SET FOIL "text"
DEFINE STYLE "text_1" arial , 0.7 , 8 , 1
STYLE text_1
TEXT2 REF_X / 2 , 0.005 , STR ( "%.2" , REF_X ) + "x" + STR ( "%.2" , REF_Y )
RESTORE 1

SET FOIL "esc_100"
POLY 4 , 0 , 0 , REF_X , 0 , REF_X , REF_Y , 0 , REF_Y
END

"Foil_definition_2D":
DEFINE FOIL "esc_100" 1 , 1 , 0 , 101 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 0 , 1 , 2
DEFINE FOIL "text" 1 , 1 , 0 , 101 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 0 , 1 , 2
RETURN

Thanks!
Xavi

Xavier Coll • Architect, Project Manager I+D, BIM Manager, BIM Auditor
EiPM • http://www.eipm.es/en/

Hi,

you have found an Achilles' heel in the 2012-SmartParts implementation:

Only text inside a foil not working corretly, because the bounding box calculation fails!
I recommend, that you place another element on the same foil together with text, for instance an "under-line" or an box around the text.

Or you place the text on the same foil like the 2D-elements for that scale.
Then it works...

(In the next version works correctly!)

Regards.

Jörg

Very good trip, Jörg! :-)
Now the smarpart it's working perfect. This is the script modifyed:
(In case anyone wants to see it corrected)

REF_HANDLES
GOSUB "Definición_folios_2D"

!!!!!!!!!!!TEXT
DRAW_SEQ 25
LAYER "G27"
!-----------------Text 1/50
SET FOIL "text_esc_50"
DEFINE STYLE "text_50" arial , 0.7 , 8 , 1
STYLE text_50
TEXT2 REF_X / 2 , 0.005 , STR ( "%.2" , REF_X ) + "x" + STR ( "%.2" , REF_Y )
LINE2 0 , 0 , 0 , 0
!-----------------Text 1/100
SET FOIL "text_esc_100"
DEFINE STYLE "text_100" arial , 0.35 , 8 , 1
STYLE text_100
TEXT2 REF_X / 2 , 0.005 , STR ( "%.2" , REF_X ) + "x" + STR ( "%.2" , REF_Y )
LINE2 0 , 0 , 0 , 0

END

!-----------------Definición de macrofolios
"Definición_folios_2D":
DEFINE FOIL "text_esc_50" 1 , 1 , 0 , 51 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 0 , 1 , 2
DEFINE FOIL "text_esc_100" 1 , 1 , 51 , 101 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 0 , 1 , 2
RETURN

Thanks a lot Jörg!
Xavi

Xavier Coll • Architect, Project Manager I+D, BIM Manager, BIM Auditor
EiPM • http://www.eipm.es/en/

Hello

I just try to simplify the code to avoid a repetition of code, but without y happened.
It works but always requires a tedious "refrech"...

For this code simple this is not too serious this repetition, but in very long codes, or there is a risk of changes or correction of code should be simple solutions.

"DEFINE FOIL" is still not a simple parameters a to implement

Here is my code:

###in general parameters:

IF GLOB_SCALE = 100 THEN
tex = 0.35
ELSE
tex = 0.70
ENDIF

###in 2D parameters:

REF_HANDLES

!!!!!!!!!!!TEXT
DRAW_SEQ 25
LAYER "G27"
DEFINE STYLE "text_gen" arial , tex , 8 , 1
STYLE text_gen
TEXT2 REF_X / 2 , 0.005 , STR ( "%.2" , REF_X ) + "x" + STR ( "%.2" , REF_Y )
LINE2 0 , 0 , 0 , 0

Administrateur forum : Allplan.leforum.eu

http://allplan.leforum.eu

Olivier1

Hello,

I don't understand your problem!
But I have found some bugs in your Code:
1.Use Master-Script for first part
------------------------------------
IF GLOB_SCALE = 100 THEN
tex = 0.35
ELSE
tex = 0.70
ENDIF

This part has to be inside the Master-Script. Not inside Parameter-Script!

2. Use Quotes for String-Literals
--------------------------------------
DEFINE STYLE "text_gen" "Arial" , tex , 8 , 1
..without the qoutes around arial the variable arial is read!

I mentioned above, that the use of GLOB_SCALE only have effect, if the script is executed!
And that need's a "Refresh"

If you want to change the representation by scale without refresh, you have to implement several representations for different scales on foils

Regards.

Jörg

11 - 20 (31)

https://campus.allplan.com/ verwendet Cookies  -  Mehr Informationen

Akzeptieren