Home › Forums › General discussions › Parmameter handover
- This topic has 6 replies, 3 voices, and was last updated 7 years, 5 months ago by René Ande.
-
AuthorPosts
-
-
April 23, 2017 at 19:31 #3212René AndeParticipant
Hi there
I want to do two things:
a) read-out the parameters of an object and
b) hand it over to the user-interface as well as the 3D-scriptThe basis was the “Property Label Example AC20.gsm” which I copied to a new element. I added in the masterscript the following comandline:
n = REQUEST (“Property_Name”, myProperty, _typeName, _groupName, _propertyName)
test01 = _propertyName
from that point I could handover the parameter _propertyName to the user-interface as well as the 2D-script. Unfortunatelly the string was always empty when handovered to the 3D-script.
text 0.001,0 ,test01 -> did not worka) how can I easily search in the myProperty array after a certain value, for example “Schloss”
b) how can I handover the string to the 3D-scriptThanks in advance
René
-
April 24, 2017 at 06:27 #3214Gergely FehérKeymaster
“Property_Name” request is designed for labels: it works in UI and 2d scripts.
Searching in an array:
myValueIdx = 0
for ii = 1 to vardim1(myArray)
if myArray[ii] = “mySearchValue” then
myValueIdx = ii
ii = vardim1(myArray) !break
endif
next iiGergely Fehér
Team Leader, Library Team
GRAPHISOFT SE -
April 26, 2017 at 06:33 #3215René AndeParticipant
Ok, the other way round, is it possible to read out a variable into an excel which I set in an ui_infield?
Thanks René
-
April 26, 2017 at 13:44 #3216Gergely FehérKeymaster
Sorry, I simply don’t understand what do you want. With this request you can get the property’s name, group and type – in 2d script or UI. You should not store or export this to anywhere, as it becomes outdated at the moment you store it…
Gergely Fehér
Team Leader, Library Team
GRAPHISOFT SE -
April 26, 2017 at 14:35 #3217René AndeParticipant
For production we have to generate an visual picture and a partslists.
The idea is to draw an object depending on the user input. e.g. if tick01 is set draw a block / if tick02 is set make a hole in this block.
After this export the booleans of tick01 and tick02 so I know that in object a) there is only a block, in object b) there is a block and a hole.userinterface
ui_infield{3} “tick01”, 15, 210, 180, 19,
7, “”,
0, 0,
0, 0, 0, 0,
“”,there's no block
, 0,
“”,there's a block
, 1
(same for tick02)in 3D-shape
if tick01 then
block 1,1,1
endif(same for hole)
-> and now here to read-out the variable tick01 and tick02
-
April 27, 2017 at 07:55 #3218Péter BaksaKeymaster
Hi René,
If you need to export the parameters outside ArchiCAD, use Schedules.
You can add library part parameters to the schedule using Scheme Settings dialog / Add Fields / Library Part Parameters. In the next dialog Select Object by: Folder View (used Objects only), then select the library part you need, and add it’s parameters to the list.
After configuring the schedule, create a view from it, and add that to a publisher set. Finally select XLS format.
It’s a long way to set up first time, but only a click to refresh the XLS after that.Péter Baksa
Library Platform, Software Engineer
GRAPHISOFT SE -
May 3, 2017 at 19:23 #3221René AndeParticipant
Hi there
Took me some time to do but now it works, thanks.
If I could place a wish for Version 22, why don’t you expand the REQUEST command to the 3D script?Greetings René
-
-
AuthorPosts
- The forum ‘General discussions’ is closed to new topics and replies.