Parameter Label
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2012-09-10 08:47 AM
2012-09-10
08:47 AM
I am having real difficulty creating a label for an object I have made.
It is an object with a parameter that when I change it, it changes the panel material colour.
Now I have got this label to work, however it comes up with error messages within the 2D script. Im sure it is just because I have coded it a bit messy.
Does anyone have any ideas how I could code this and avoid the error?
6 REPLIES 6
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2012-09-10 11:30 AM
2012-09-10
11:30 AM
Tom,
Is this object a LABEL or a general object?
Because I have a problem when I try to load it as a label object:
Is this object a LABEL or a general object?
Because I have a problem when I try to load it as a label object:
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2012-09-11 12:46 AM
2012-09-11
12:46 AM
Hi,
Sorry I have just realised how rushed and rude my first comment was.
It is an ArchiCAD 16 Label
Basically I have used the following command in the master script
pc=REQUEST ("ASSOCLP_PARVALUE", "pcolour", nameind_pc, type_pc, flag_pc, dim1_pc, dim2_pc, val_pc)
Now what I want to use in the 2D script is the 'val_pc'
In the object I want to label I have the parameter 'pcolour' with the values (val_pc)
01 Black Caviar
02 Highlander
03 Jurassic Park
......
18 Vivid White
I want to know how to translate this into text to use in a text2 command.
Then I want to split the text so I only see the number (eg, '01')
Im guessing I use the STW then SPLIT commands, but my puny brain cant work it out.
Tom
Sorry I have just realised how rushed and rude my first comment was.
It is an ArchiCAD 16 Label
Basically I have used the following command in the master script
pc=REQUEST ("ASSOCLP_PARVALUE", "pcolour", nameind_pc, type_pc, flag_pc, dim1_pc, dim2_pc, val_pc)
Now what I want to use in the 2D script is the 'val_pc'
In the object I want to label I have the parameter 'pcolour' with the values (val_pc)
01 Black Caviar
02 Highlander
03 Jurassic Park
......
18 Vivid White
I want to know how to translate this into text to use in a text2 command.
Then I want to split the text so I only see the number (eg, '01')
Im guessing I use the STW then SPLIT commands, but my puny brain cant work it out.
Tom
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2012-09-11 09:25 PM
2012-09-11
09:25 PM
Hello,
findspace= strstr(val_pc, " ") codeonly= strsub(val_pc, 1, findspace-1) text2 0, 0, codeonlyHope this works
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2012-09-12 01:21 AM
2012-09-12
01:21 AM
Thanks Juha,
The code you did essentially works, however I get the 2D code error of 'STRING TYPE EXPESSION'.
This is quite frustrating as when I open the label tool, I get this message popping up.
Is there something I need to type after the REQUEST command in the master script the change the expression?
The code you did essentially works, however I get the 2D code error of 'STRING TYPE EXPESSION'.
This is quite frustrating as when I open the label tool, I get this message popping up.
Is there something I need to type after the REQUEST command in the master script the change the expression?
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2012-09-12 01:39 AM
2012-09-12
01:39 AM
Just got it workings.
I just needed to add val_pc as a parameter, which I made hidden.
Works great.
Thank you!
I just needed to add val_pc as a parameter, which I made hidden.
Works great.
Thank you!
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2012-09-12 09:27 AM
2012-09-12
09:27 AM
If You added before the operations:
Best Regards,
Piotr
val_pc=""You would not need to add it as parameter.
Best Regards,
Piotr