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/

21 - 30 (31)

QUESTION 3 How to create one polyline with lines and arcs?

I stumbled about this question and I want to help if I can.
It's all about the codes when using poly2_

!First type of polyline with arc with the code 1000

put 0,0,15,
1,0,15,
1,1,15,
0,1,1000

poly2_ num_sp/3,1+2+4,get(num_sp)

!or
!Second type of polyline with arc with the code 2000
!it uses a center point, and an angle
!x0,y0,900 centre of arc
!r,a,2000

u=65 !angle
r=0.4 !radius

trans2 2,0

put 0,0,15,
1,0,15,
1,1,15,
0.5,0.5,900,
r,u,2000

poly2_ num_sp/3,1+2+4,get(num_sp)

for other arcs there are 3000 with centre point and points of final radius,
x, y, 3000+s,
and 4000 with centrepoint and angle of the arc
0,a,4000+s
or full circle
r,360,4000+s

Or there are trics to decide which line to shown or not

set fill 4

put 0,0,15,
1,0,0, !this line will not be shown
1,1,15,
0.5,0.1,900+1, !cenerpoint
0,1,3000+1, !final point of arc; add +1 or other value
0,0,15

poly2_ num_sp/3,1+2+4+8+16,get(num_sp) !add 8+16

There is an odd command in smartpart,it's not even listed in the script commands of the smartparts
sect_fill
SECT_PATTERN
.....
which somehow shows you a preview of the fill of the sectioned 3d solid but when you do the hidden line calculation the fill or hatching dissapears.

Although I mentioned this command in an older entry, I've seen it working on mpm990 objects after allplan 2012 1-2 has been launched.
https://connect.allplan.com/en/forum/overview.html?tx_mmforum_pi1[action]=list_post&tx_mmforum_pi1[tid]=1866

Anhänge (1)

Typ: image/jpeg
387-mal heruntergeladen
Größe: 52,44 KiB

Thanks mpm990, Jörg and Haidu for yours answers! :-)

I'm totally agree with mpm990: working with global values is more efficient than working with folies. I'm creating others smartparts, like doors and windows, and the writing of the code considering folies is really long and tedious. In the wishlist, could be interesting to organize the looooooong code scripting, by substructuring like a tree structure, using text colour, etc...

As Jörg wrote some posts ago, he explain that they are working about the refresh of the Smartpart like doors, etc.. Also could be interesting that the smartparts automatically refresh when it change any global parameter, like the "Drawing type set" (Zeichnunstyp) o "Reference Scale" (BezugsmaBstab).

In essence, it would be very interesting that the Smartparts make at least the same as the Smart Symbols (Makros).

About QUESTION 3 ---------------------------------
Haidu, I have some questions about polylines (sorry, my questions will be very basic!)
QUESTION 3B In the first script you wrote:

put 0,0,15,
1,0,15,
1,1,15,
0,1,1000
poly2_ num_sp/3,1+2+4,get(num_sp)

The value 15, whats this value?
And the num_sp, is the value 15?

About the odd commands ---------------------------------
Sorry, I haven't information about sect_fill and SECT_PATTERN commands. Perhaps Jörg can explain something about it.

Thanks!
Xavi

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

it's just a usual value it can be anithing from 0 to 100 for basic points.

Hi all! after a week off, I'm back here!
Thanks Haidu for your answers! :-)
I'm not a programmer, and there are plenty of commands that have not yet tried. Now I'm starting to master the commands Poly_ and Poly2_, creating polylines with arcs using the status code, and other commands like PUT, GET, USE, num_sp.
I had to search and read Archicad GDL documentation (documentation with many examples) but it would be impossible for me without these documentation (and without the help of this forum), because there aren't enough deep documentation about SmartParts.

The next step is to learn and correctly use the commands Hatching and Pattern. Be prepared, I'm sure I will have many questions to do! :-)

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

Mmmm.... how I can fill a polyline with a pattern? I'm trying it but I can't. This is my smartpart script :-)

DEFINE PATTERN "tramita" 40 , 1 , 0 , 1 , 1 , 0 , 0 , 2 , 0 , 0
PATTERN tramita
POLY 4 , 0 , 0 , REF_X , 0 , REF_X , REF_Y , 0 , REF_Y

Thanks a lot!
Xavi

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

yihaa,
I got it for you.

try this one:

DEFINE PATTERN "tramita" 40 , 1 , 0 , 1 , 1 , 0 , 0 , 2 , 0 , 0
PATTERN "tramita"
POLY2 4 ,7, 0 , 0 , REF_X , 0 , REF_X , REF_Y , 0 , REF_Y

________________________________

in second row the " before and after tramita is missing
and in row3 we have to use POLY2 and add a 7 as frame_fill for the visibility (POLY2 n, frame_fill, x1, y1, ... xn, yn)

explanation frame_fill:
frame_fill (integer): defines type of contour and/or fill, j1 + 2*j2 + 4*j3
j1: contour only, 0=invisible, 1=visible
j2: fill only, 0=invisible, 1=visible
j3: polygon open/closed, 0=do not close polygon, 1=close polygon

now it should work

with regards
Thomas

wiedermal als Bauzeichner tätig, zumindest auf Halbjahres-Basis. Das andere halbe Jahr ist fürs das Abenteuerleben reserviert.

Darüber wird wie schon seit 10 Jahren auf https://www.snowmanstudios.de berichtet.

Thanks Thomas, you are right! Now works ok :-)

There is some confusion on how to use "" in various commands of the Smartparts, in the second rows. For example, when you define a Hatching or Pattern, the sample script is:

DEFINE PATTERN "trama" 40 , 1 , 0 , 1 , 1 , 0 , 0 , 2 , 0 , 0
PATTERN "trama"
POLY2 4 ,7, 0 , 0 , REF_X , 0 , REF_X , REF_Y , 0 , REF_Y

But, when you define a Text, it's no necessary to use "". like the next sample script:

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 )

------------------------------------------

And now, another question. If I define a Pattern Parameter, with the name fill_patt and value 40, how would be the script? I'm trying this, but it doesn't work:

PATTERN Fill_Patt
POLY2 4 , 0 + 2 + 4 , 0 , 0 , REF_X , 0 , REF_X , REF_Y , 0 , REF_Y

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

I think this is the only way. You have to define the parameter. Plus, in the parameters settings the parameter pattern_fill should be a pattern type.

pattern_fill=40

DEFINE PATTERN "trama" pattern_fill , 1 , 0 , 1 , 1 , 0 , 0 , 2 , 0 , 0
PATTERN "trama"
POLY2 4 ,7, 0 , 0 , REF_X , 0 , REF_X , REF_Y , 0 , REF_y

21 - 30 (31)