David Shorter

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 30 total)
  • Author
    Posts
  • in reply to: SPLIT #4675
    David Shorter
    Participant

    here you go
    !!!!!2D script
    !!=======================
    string=“#4 Rebar”
    number=strlen(string)
    text2 0,0,number
    reducedString=STRSUB(string, 2,number-2)
    text2 0,-.5, reducedString
    !!=======================
    number = 9
    reducedString = 4 Rebar

    this is one way but there per others
    Hope this helps
    David

    Attachments:
    in reply to: Hotspot for boolean editing #4623
    David Shorter
    Participant

    zPos is the moveable hotspot parameter

    in reply to: Hotspot for boolean editing #4621
    David Shorter
    Participant

    I don’t know if this helps but here goes….
    ! Name : silly.gsm
    ! Date : Saturday, 23 February 2019
    ! Version : 22.00
    ! Written by ARCHICAD

    values “zPos” 0,0.2,0.4,0.6,0.8,1,1.2,1.4,1.6,1.8

    if zPos =0 then penAttribute_1= 15
    if zPos =0 then text2 .5,zPos,”t1″
    if zPos =.2 then penAttribute_1= 16
    if zPos =0.2 then text2 .5,zPos,”t2″
    if zPos =.4 then penAttribute_1= 17
    if zPos =0.4 then text2 .5,zPos,”t3″
    if zPos =.6 then penAttribute_1= 18
    if zPos =0.6 then text2 .5,zPos,”t4″
    if zPos =.8 then penAttribute_1= 19
    if zPos =0.8 then text2 .5,zPos,”t5″
    if zPos =1 then penAttribute_1= 20
    if zPos =1 then text2 .5,zPos,”t6″

    unID=2000

    HOTSPOT2 .5, 0, unID, zPos, 1:unID=unID+1
    HOTSPOT2 .5,-0.1, unID, zPos, 3:unID=unID+1
    HOTSPOT2 .5, zPos, unID,zPos, 2 :unID=unID+1

    mul2 A/0.467201, B/0.467201
    add2 0.233600530869, 0.233600530869
    set line_type lineTypeAttribute_1
    pen penAttribute_1
    fill fillAttribute_1
    poly2_b{5} 5, 3, 1, 3, penAttribute_1, penAttribute_2,
    0, 0, 1, 0, 0, 1, 0,
    -0.233600530869, 2.860781424079E-17, 33,
    0, 1.430390712039E-17, 900,
    0, 180, 4033,
    0, 1.430390712039E-17, 900,
    0, 180, 4033

    in reply to: Issue with label and surface override #4609
    David Shorter
    Participant

    Hi Barry
    Yes it was except that it was the “or nothing” which I felt was wrong otherwise all 3 no override buttons should show nothing which is IMHO not logical. If not pressed it should show the BM surface as its the only place where we can see the surfaces of the wall.
    regards
    David

    in reply to: Issue with label and surface override #4607
    David Shorter
    Participant

    Hmmm disagree with you on that point Barry.
    When the override button is pressed it should show the override.
    When the override button is not pressed it should show the BM surface.
    This is logical and shows the surface visible in 3D, anything else is not logical.

    in reply to: Issue with label and surface override #4604
    David Shorter
    Participant

    Hi Peter
    But this is so wrong. It means that once an override is made that it’s impossible to know which surface is being used.
    When the button next to the surface is NOT pressed then the surface name displayed should be the default or NON overwritten surface. It’s just not logical to display the wrong name. I appreciate this is really outside the scope of this forum but appreciate you help in resolving this issue.
    Thanks
    David

    in reply to: Issue with label and surface override #4599
    David Shorter
    Participant

    Hi Barry
    Yes
    and the problem is that the label whilst it maybe correct the user doesn’t know because the dialogue is not correct. Somehow the cache is in the label because attaching the label a new wall will ‘sometimes’ show an override ‘ghost’ which has never been used with that wall.
    driving me crazy

    in reply to: Issue with label and surface override #4597
    David Shorter
    Participant

    Hi Peter
    If you look at the upper part of the attachment the name “A001:Brickwork Face” appears but this is the override surface not the surface of the Building Material. The building material surface is correctly reported in the label text.
    This same name tends to be reported in in a new wall.

    in reply to: how to get the surface name of a complex wall #4563
    David Shorter
    Participant

    Having checked this out in more detail I conclude this is serious bug which poses a serious limitation when trying to annotate surfaces.

    in reply to: GDL Script #4561
    David Shorter
    Participant

    One of the things I like about ARCHICAD is that you can learn something new every day.
    I didn’t know you could call a variable.

    Thanks Frank.

    in reply to: GDL Script #4552
    David Shorter
    Participant

    If you highlight the ‘typ_ouv’ in the 3D script window and go to the file menu> libraries and objects> open object, ARCHICAD should find the macro and open it
    Sorry if you already know this
    Hope it helps

    in reply to: Value liste as text instead of numbers? #4544
    David Shorter
    Participant

    Be that as it may, it took me about an hour to locate the problem because its almost impossible to see the difference in the scripting window. A trap for the unwary.

    in reply to: Value liste as text instead of numbers? #4540
    David Shorter
    Participant

    this is how its supposed to work

    Attachments:
    in reply to: Value liste as text instead of numbers? #4539
    David Shorter
    Participant

    Thanks Peter, but a bit advanced for a novice scripter
    Mats, if you replace the values statement with this it will work
    values “zPos” 0,0.2,0.4,0.6,0.8,1,1.2,1.4,1.6,1.8
    apparently in the script I sent you the parenthesis each side of the zPos were different causing the error, very difficult to spot
    Peter perhaps the developers could fix this
    this “zPos” snd this “zPos” are different causing the error
    regards
    D

    in reply to: Value liste as text instead of numbers? #4528
    David Shorter
    Participant

    be careful with a dedicated programer …. they MUST understand ARCHICAD AND must leave the code (scripts) unlocked
    here is another option…
    values “zPos” 0,0.2,0.4,0.6,0.8,1,1.2,1.4,1.6,1.8

    if zPos =0 then penAttribute_1= 15
    if zPos =0 then text2 .5,zPos,”t1″
    if zPos =.2 then penAttribute_1= 16
    if zPos =0.2 then text2 .5,zPos,”t2″
    if zPos =.4 then penAttribute_1= 17
    if zPos =0.4 then text2 .5,zPos,”t3″
    if zPos =.6 then penAttribute_1= 18
    if zPos =0.6 then text2 .5,zPos,”t4″
    if zPos =.8 then penAttribute_1= 19
    if zPos =0.8 then text2 .5,zPos,”t5″
    if zPos =1 then penAttribute_1= 20
    if zPos =1 then text2 .5,zPos,”t6″

    unID=2000

    HOTSPOT2 .5, 0, unID, zPos, 1:unID=unID+1
    HOTSPOT2 .5,-0.1, unID, zPos, 3:unID=unID+1
    HOTSPOT2 .5, zPos, unID,zPos, 2 :unID=unID+1

    mul2 A/0.467201, B/0.467201
    add2 0.233600530869, 0.233600530869
    set line_type lineTypeAttribute_1
    pen penAttribute_1
    fill fillAttribute_1
    poly2_b{5} 5, 3, 1, 3, penAttribute_1, penAttribute_2,
    0, 0, 1, 0, 0, 1, 0,
    -0.233600530869, 2.860781424079E-17, 33,
    0, 1.430390712039E-17, 900,
    0, 180, 4033,
    0, 1.430390712039E-17, 900,
    0, 180, 4033
    !_____________________________________
    zPos is a length parameter
    and the script creates a moveable hotspot that you can drag vertically and change the text and the pen at each position.
    Means you dont have to open the object dialogue to change the settings its all done through the moving hotspot.
    all the above is in the Master script and the parameters are in the screenshot

    Attachments:
Viewing 15 posts - 1 through 15 (of 30 total)