Forum Replies Created
-
AuthorPosts
-
David Shorter
Participanthere 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 Rebarthis is one way but there per others
Hope this helps
DavidAttachments:
David Shorter
ParticipantzPos is the moveable hotspot parameter
David Shorter
ParticipantI don’t know if this helps but here goes….
! Name : silly.gsm
! Date : Saturday, 23 February 2019
! Version : 22.00
! Written by ARCHICADvalues “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+1mul2 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, 4033David Shorter
ParticipantHi 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
DavidDavid Shorter
ParticipantHmmm 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.David Shorter
ParticipantHi 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
DavidAttachments:
David Shorter
ParticipantHi 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 crazyDavid Shorter
ParticipantHi 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.David Shorter
ParticipantHaving checked this out in more detail I conclude this is serious bug which poses a serious limitation when trying to annotate surfaces.
David Shorter
ParticipantOne 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.
David Shorter
ParticipantIf 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 helpsDavid Shorter
ParticipantBe 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.
David Shorter
Participantthis is how its supposed to work
Attachments:
David Shorter
ParticipantThanks 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
DDavid Shorter
Participantbe 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.8if 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+1mul2 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 screenshotAttachments:
-
AuthorPosts