SPLIT command

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-08-30 04:54 PM
2006-08-30
04:54 PM
I would like to improve it but I'm getting stuck trying to use the SPLIT command. A bit annoying as I used it quite easily with my metal stud object.
What I'm trying to do is allow the user to make a selection from a pop up list of possible notes that he/she/it can choose from. I only want the first two digits of the selected note as that then tells the script which note to use.
The Notes look like this....
"01 Internal lining system comprising two layers",
"02 Weatherproof internal lining system comprising",
"03 Secondary steelwork to Engineer's detail WP220",
"04 Stone rainscreen cladding incorporating ",
"05 Black tissue faced mineral wool insulation WP325",
"06 Standard pressure capped PPC finished",
"07 Structural silicone glazing comprising extruded",
"08 Shopfront glazing comprising extruded",
"09 Shuffle glaz.... etc etc
In the Master script I have this...
knoteref = knselec
kncon is a parameter that the Parameter Script uses to give the user a list of possible notes to choose from
In the 2d script I have this
IF knoteref = "01" THEN GOSUB 101
IF knselec = "02" THEN GOSUB 102
IF knselec = "03" THEN GOSUB 103
IF knselec = "04" THEN GOSUB 104
IF knselec = "05" THEN GOSUB 105
but I get an error saying
I've tried getting it to extract it as a numerical expression and and as a string expression but I still get the error.
Any help would be much appreciated
AC versions 3.41 to 25 (UKI Full 5005).
Using AC25 5005 UKI FULL
Mac OSX 10.15.7 (19G2021) Mac Pro-2013 32gbRam AMD FirePro D500 3072 MB graphics
Using AC25 5005 UKI FULL
Mac OSX 10.15.7 (19G2021) Mac Pro-2013 32gbRam AMD FirePro D500 3072 MB graphics
7 REPLIES 7
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-08-30 05:04 PM
2006-08-30
05:04 PM
Why don't you use this:
IF STRSUB(kncon,1,2) = "01" THEN GOSUB 101
IF STRSUB(kncon,1,2) = "01" THEN GOSUB 101
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-08-30 05:52 PM
2006-08-30
05:52 PM
Thanks I will give that a spin

AC versions 3.41 to 25 (UKI Full 5005).
Using AC25 5005 UKI FULL
Mac OSX 10.15.7 (19G2021) Mac Pro-2013 32gbRam AMD FirePro D500 3072 MB graphics
Using AC25 5005 UKI FULL
Mac OSX 10.15.7 (19G2021) Mac Pro-2013 32gbRam AMD FirePro D500 3072 MB graphics
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-08-30 10:04 PM
2006-08-30
10:04 PM
This should work too:
(Works without dummy in AC 8.1 too.)
knserial = SPLIT (kncon, "%n %s" , knselec, dummystring) knoteref = knselec IF knoteref = 1 THEN GOSUB 101If it does not work, you should upgrade your AC9v1 to v2, because here the v1 has a bug.
(Works without dummy in AC 8.1 too.)
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-08-30 10:53 PM
2006-08-30
10:53 PM
Hello Frank,
I did not know that there was a v2 version of AC 9.
When I "get info" on my AC 9 application, it says
"version 9.0.0 v1 USA (8335/2219)".
I launched AC 9 and went to "check for updates"
and found that my version was the latest.
Are you referring to the 2219 build or is there
a v2 of the AC 9 application you have ?
Thanks,
Peter Devlin
I did not know that there was a v2 version of AC 9.
When I "get info" on my AC 9 application, it says
"version 9.0.0 v1 USA (8335/2219)".
I launched AC 9 and went to "check for updates"
and found that my version was the latest.
Are you referring to the 2219 build or is there
a v2 of the AC 9 application you have ?
Thanks,
Peter Devlin
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-08-30 11:33 PM
2006-08-30
11:33 PM
Can't proof it and maybe you are right. The first was 18-something and the second 2219 I guess. May be they didn't call it v2, because the programmers wear a shirt "no v2 anymore" before the launch. There was a picture in the web of them. 
In every case there was a bug with SPLIT in the fdirst release of AC9.

In every case there was a bug with SPLIT in the fdirst release of AC9.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-08-30 11:53 PM
2006-08-30
11:53 PM
Thanks, Frank,
I was worried there for a minute that I had missed something
(like maybe a T shirt).
Peter Devlin
I was worried there for a minute that I had missed something
(like maybe a T shirt).

Peter Devlin

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-08-30 11:53 PM
2006-08-30
11:53 PM
F. wrote:Thanks Frank that worked a treat. I shall post the latest version once I've finished tweaking the "Help" prompts I have in the object.
Why don't you use this:
IF STRSUB(kncon,1,2) = "01" THEN GOSUB 101
Thanks again
AC versions 3.41 to 25 (UKI Full 5005).
Using AC25 5005 UKI FULL
Mac OSX 10.15.7 (19G2021) Mac Pro-2013 32gbRam AMD FirePro D500 3072 MB graphics
Using AC25 5005 UKI FULL
Mac OSX 10.15.7 (19G2021) Mac Pro-2013 32gbRam AMD FirePro D500 3072 MB graphics