Barry Kelly

Forum Replies Created

Viewing 15 posts - 76 through 90 (of 170 total)
  • Author
    Posts
  • Barry Kelly
    Participant

    This is the best I can come up with at the moment – need to get back to real work!

    values "flip_switch" 0,1
    
    n = APPLICATION_QUERY ("parameter_script", "firstoccasion_in_progress", isFirstRun)
    
    if isFirstRun then
    	if flip_switch = 1 then
    		A = A + 1
    		PARAMETERS A = A
    !!		flip_switch = 0
    !!		PARAMETERS flip_switch = flip_switch
    	endif
    endif

    This is what you need in the parameter script.
    Delete what you have in the master script.

    This works in 3D but you have to reset the hotspot to zero your self.
    Odd thing is the info box increases by 3000 but the object shows correct at 2000 (see image).
    If you open the settings dialogue it will increase another 1000 to 5000.
    Not sure what is going on there.

    If you in-comment the two lines in my script then it all works perfectly but the hotspot does not stretch any more as it is obviously being reset before the object adjusts.
    But changing the parameter in the settings dialogue works.

    This may give some help or maybe someone else has some better ideas.

    Barry.

    Attachments:

    Versions 6.5 to 22
    Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
    Dell Precision M6800 - i7 4700MQ @ 2.40GHz, 16GB RAM, AMD FirePro M6100 (2GB), Windows 7 64bit

    Barry Kelly
    Participant

    GLOB_FEEDBACK_MODE is view dependent, so it shouldn’t be used in the parameter script – this includes the master script when it runs as the parameter script (which it will do).
    You would probably be better off using it just in the 2D and/or 3D scripts.

    Barry.

    Versions 6.5 to 22
    Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
    Dell Precision M6800 - i7 4700MQ @ 2.40GHz, 16GB RAM, AMD FirePro M6100 (2GB), Windows 7 64bit

    in reply to: Split Function Problem #3985
    Barry Kelly
    Participant

    If your storey name is “GF-Ground Floor” then you will find that “GF-Ground” is one part of the string and “Floor” is another.
    So …

    x = REQUEST (“Home_story”, “”, index, story_name)

    n = SPLIT (story_name, "%s %s", split1, split2) 
    IF n THEN
        text2 0, 0.5, story_name
        text2 0, 0, split1
        text2 0, -0.5, split2
    ENDIF

    What you actually need to do is search for the “-” character.
    Assuming this is the same for all your storeys.
    Then output the required number of characters.

    pos = STRSTR (story_name, "-")
    !    text2 0, 0, pos
    
    prefix = STRSUB (story_name, 1, pos-1)
        text2 0, -2, prefix

    Of course if the prefix is always 2 characters you know this already so you can just output the first 2 characters with STRSUB.

    Versions 6.5 to 22
    Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
    Dell Precision M6800 - i7 4700MQ @ 2.40GHz, 16GB RAM, AMD FirePro M6100 (2GB), Windows 7 64bit

    Barry Kelly
    Participant

    Are you opening exactly the same file in all versions or are you just placing the object in the template (or any file) for 18 and then the template (or any file) for 20?
    If two separate files are the attributes the same in both files?
    Seems to me you might have different attributes for the same index numbers.

    Barry.

    Versions 6.5 to 22
    Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
    Dell Precision M6800 - i7 4700MQ @ 2.40GHz, 16GB RAM, AMD FirePro M6100 (2GB), Windows 7 64bit

    in reply to: Temporary Migration for a hotlinked object #3956
    Barry Kelly
    Participant

    OK I see now.
    I would say you have a couple of options.

    Modify the existing object so it has the MVO option (and of course add the option to the MVO).
    Of course the problem with this is if GS ever update the library, you will not be able to update this door or the MVO scripts without losing all the work you have done.

    So you really have no choice except to create a new door object.
    I would ‘save as’ the door so it has a new GUID.
    Add the MVO settings and create a new MVO interface page that controls this setting.
    Now you have two objects that won’t ever get updated – you just have to load them together with any new library.
    Except now you have the problem of replacing all the doors in you file.
    If not too many I would do it manually – transferring the parameters as you swap the object.
    If there is a lot to change then I would add a migration script to the new door.
    You will have to extract the LCF library so you can temporarily delete the original door.
    The door object should now swap for your new one.
    Re-load the original LCF library together with your new door and MVO and you should be fine.
    Just to be on the safe side I would remove the migration script in the new door object.

    Barry.

    Versions 6.5 to 22
    Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
    Dell Precision M6800 - i7 4700MQ @ 2.40GHz, 16GB RAM, AMD FirePro M6100 (2GB), Windows 7 64bit

    in reply to: Temporary Migration for a hotlinked object #3953
    Barry Kelly
    Participant

    I am a bit confused.
    The angle of the door swing is not set in the MVO currently as far as I know (I don’t actually use the GS library but I just had a quick look).

    Why don’t you just manually set the angle of the doors in that one plan to 45°.
    What ever angle you set them to is what they should be even when used in a hot-link.

    Barry.

    Versions 6.5 to 22
    Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
    Dell Precision M6800 - i7 4700MQ @ 2.40GHz, 16GB RAM, AMD FirePro M6100 (2GB), Windows 7 64bit

    in reply to: Double adding to parameter #3807
    Barry Kelly
    Participant

    Also now in the Compatibility Options in the Details page there is an option to run the parameter script once.
    I haven’t looked into this yet as I haven’t had the need.

    Barry.

    Versions 6.5 to 22
    Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
    Dell Precision M6800 - i7 4700MQ @ 2.40GHz, 16GB RAM, AMD FirePro M6100 (2GB), Windows 7 64bit

    in reply to: Double adding to parameter #3803
    Barry Kelly
    Participant

    The parameter script (or master as parameter script) will be run more than once so you need to trap it.
    This should help do that.
    From the GDL manual …

    First Occasion in Progress

    n = APPLICATION_QUERY (“parameter_script”, “firstoccasion_in_progress”, isFirstRun)

    This command returns whether the current run is the first run or a consequence of a previous execution of the parameter script which changed
    some parameters. This command has no additional parameters.
    The distinction may be important when a part of the parameter script executes a triggered event – e.g. it handles the pushing of a function button.
    isFirstRun: The returned value shows whether the current run is the first run

    Barry.

    Versions 6.5 to 22
    Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
    Dell Precision M6800 - i7 4700MQ @ 2.40GHz, 16GB RAM, AMD FirePro M6100 (2GB), Windows 7 64bit

    in reply to: U-value and Skin List Label for Composite Walls #3773
    Barry Kelly
    Participant

    Oh, is it just me, that the code block gets messed up and renders unreadable? (macOS, Safari)

    It is all there if you select over the text in your message.
    I have noticed this in other posts as well.

    Barry.

    Versions 6.5 to 22
    Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
    Dell Precision M6800 - i7 4700MQ @ 2.40GHz, 16GB RAM, AMD FirePro M6100 (2GB), Windows 7 64bit

    Barry Kelly
    Participant

    There may be a way if the MVO object has been left with the ‘Placeable’ option on when saved.
    You can place it in the plan and then select it (you won’t see it but you can select it – just place , then UNDO and then REDO to have it selected).
    Now save this selection as a new object.
    You can now open the script of this new object and in the 2D script you will see a CALL command with all the parameters listed.

    I can understand the need to password protect objects but I think it would be a good idea if the parameter list was not included in the protection.
    Any password protected objects are almost useless to me as I use different attributes (pens, linestyles, surfaces, etc.) to suit my own template.
    I would like to be able to alter the default parameter settings so I can use the object with my template.
    My only option is to set up a favourite for each object or ‘save’ them as above and then create a parameter list and adjust the CALL commands so I can set the values I want from a user perspective.

    Barry.

    Versions 6.5 to 22
    Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
    Dell Precision M6800 - i7 4700MQ @ 2.40GHz, 16GB RAM, AMD FirePro M6100 (2GB), Windows 7 64bit

    in reply to: zone number counting value #3690
    Barry Kelly
    Participant

    I just did a quick test by adding a prefix to the room number parameter in the zone object script.
    Automatic numbering still worked just fine.

    Barry.

    Versions 6.5 to 22
    Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
    Dell Precision M6800 - i7 4700MQ @ 2.40GHz, 16GB RAM, AMD FirePro M6100 (2GB), Windows 7 64bit

    in reply to: Object Question #3647
    Barry Kelly
    Participant

    Rather than just saving elements as an object you would need to learn to script in GDL so that you can create the elements based on length parameters.
    That way you can control what does and doesn’t stretch.
    It is a pretty steep learning curve if you want to do anything complex but it is very rewarding.
    I have been learning GDL for the last 20 years and I’m still going.

    Barry.

    Versions 6.5 to 22
    Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
    Dell Precision M6800 - i7 4700MQ @ 2.40GHz, 16GB RAM, AMD FirePro M6100 (2GB), Windows 7 64bit

    in reply to: Stretch both ways #3620
    Barry Kelly
    Participant

    At the end of the ‘moving’ hotspot (flag type 2), you can add an optional display parameter.

    So you need the full width and half width parameters as mentioned (linked via GLOB_MODPAR_NAME).
    Then you add the hotspot to adjust the half width but add the optional parameter for the full width at the end of the moving hotspot code.
    The user will be adjusting the half width but seeing the value of the full width.

    Barry.

    Versions 6.5 to 22
    Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
    Dell Precision M6800 - i7 4700MQ @ 2.40GHz, 16GB RAM, AMD FirePro M6100 (2GB), Windows 7 64bit

    in reply to: Stretch both ways #3580
    Barry Kelly
    Participant

    It’s hard to say what is happening without seeing your objects code.

    But if you want to make both ends of an editable hotspot to be editable then you can add a ‘hotspot attribute’ of 256 to your ‘base hotspot (type 1)
    So the base hotspot would be …

    HOTSPOT2 x, y , unID , paramReference , 1+256

    Barry.

    Versions 6.5 to 22
    Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
    Dell Precision M6800 - i7 4700MQ @ 2.40GHz, 16GB RAM, AMD FirePro M6100 (2GB), Windows 7 64bit

    in reply to: Non-reproducible graphical editing bug #3571
    Barry Kelly
    Participant

    In “compatibility options” you will need to switch to “Store fixed values”.
    Then save object.

    For already placed instances you will have to change any parameter and then change it back before it will stretch.
    For newly place objects it should work straight up.

    Don’t ask me why this is but I suspect it has something to do with the fact your hotspots use the “A” value – even though they are not changing it.

    Barry.

    Versions 6.5 to 22
    Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
    Dell Precision M6800 - i7 4700MQ @ 2.40GHz, 16GB RAM, AMD FirePro M6100 (2GB), Windows 7 64bit

Viewing 15 posts - 76 through 90 (of 170 total)