KitCAD i3 URL HASH HttpRequest IO support

IE Active X warning dialog

The ENCODED value after a  HASH symbol when given in URL’s (the Fragment Identifier) will be used by KitCADi3ie5.exe (in the download of KitCADi3_file_localhost_test_w32_setup.exe) to remove/disable/avoid the Active X warning dialogs from Data exporting (found when saving, and opening files).

To disable the URL encoded HASH Http Request IO data methods in KitCADi3ie5.exe; edit the file of C:\Program Files\Kitchen\KitCADi3\Test\_i3exe.default and change i3exe = true; to be i3exe = false;

Additonal infomation from KitCAD2v5.exe installs is now used by KitCADi3ie5.exe when KitCAD i3 KGC is in 227 mode (screen size, etc). KitCADi3ie5.exe now includes 2 methods to generate data from a HASH Http Request (i3 the default mode, and 227).

To enable 227 mode (requres KitCAD2) open the Option dialog and click the link of Enable KitCAD i3 227 mode.  To change the default startup and pre-set 227 mode as the default, edit the file of C:\Program Files\Kitchen\KitCADi3\Test\_i3exe.default and change i3exemode = “i3”; to be i3exemode = “227”;
Then edit the file of C:\Program Files\Kitchen\KitCAD\lang.inf (after running KitCADi3ie5.exe, and exit), change the line of 6000-mode=i3 to be 6000-mode=227
After setting the mode to 227 (as above), KitCADi3ie5.exe will use KitCAD 1/2 software where possible (EG: kp2vrml97.exe and quote.exe). 

As example; when KitCADi3ie5.exe navigates to a page that contains an encoded value after the HASH symbol (Fragment Identifier), then action is taken.  The KitCADi3ie5.exe Save function simply adds additional data that is caught by KitCADi3ie5.exe and saved onto a file system.  So when KitCAD i3 web pages (file:// TEST version only) wants to send data to KitCADi3ie5.exe; then the following navigations of a window location fragment identifier can be made by the KitCAD i3 web pages:

document.location.hash = “#KITCADI3_HttpRequestIO_BEGIN”;
document.location.hash = “#AUTHKEY=123467890”;
document.location.hash = “#AUTHPASS=123456”;
document.location.hash = “#ACTION=kp2” ;
document.location.hash = “#Hello%20World%20first%20line%20of%20file” ;
document.location.hash = “#Hello%20Center” ;
document.location.hash = “#Hello%20World%20last%20line” ;
document.location.hash = “#KITCADI3_HttpRequestIO_END”;

Results in the following KP2 file save dialog being shown from KitCADi3ie5.exe when finding the Fragement Identifier of “KITCADI3_HttpRequestIO_END”, to then save the following file data:

Hello World first line of file
Hello Center
Hello World last line

The file may be run, but only if the mime extension/type is reconised by KitCADi3ie5.exe as somewhat safe (no security is enabled). 

The HASH HttpRequest IO support can be programmed into parent frames/windows to be accessed by Javascript, or accessed via KitCADi3ie5.exe.  Only SAVE Active X warnings have been removed by the use of HASH data transfer – there are still 4 Active X warning dialog prompts shown during various loading processes which include:

  • KitCAD i3 227 displays 0 Active X warning dialog (seen during load of KP2, 1 warnings by default).
  • KitCAD i3 KGC displays 1 Active X warning dialogs (seen during load of KP2, 1 or 2 warnings by default when loading the first Object Item).
  • KitCAD i3 _w32foei displays 1 Active X warning dialog (seen after visible objects on 2D view are rendered)

The URL HASH HttpRequest IO stream file save method is a HACK (made possible via the standards track for URL Fragment Identifiers), and is designed to allow Static/Dynamic/Scripted web pages to explode data (and avoid/disable Active-X warning dialogs prompt without $$$, or user Adjustment) – In normal use, the URL#HASH value allows the browser to navigate/scroll around a page if/when anchor text is located.  The HASH HttpRequest IO method is currently ONLY supported by the KitCAD i3 file://localhost/ TEST version when run with KitCADi3ie5.exe.

14 Responses to “KitCAD i3 URL HASH HttpRequest IO support”

  1. Admin Says:

    Almost anything can be translated, but to avoid long-timeouts it is advised to keep OUTPUT to a limited size; A 100Meg file would cause BAD lag, and prevent catching of the next set of URL#HASH commands issued by the Web Page (due to saving of the previous file. This bug could be avoided by keeping OUTPUT at each instance, etc)

    Using anchor link hash commands (automated history catche) to save big files (over 200 lines) can take a long time to process depending on the entry point – For KitCAD i3, It is suggested for Advanced administrators to use 227 mode which limits file sizes (not the default of i3 that has no limit). The current KP2 format will be translated into JSON or another SINGLE LINER format for saving/opening files at a later date (a Kp2 file of 50 Object items will take 20 seconds to save; quicker than saving a WRL, XAML, HTML or other file + much better then pushing the Y button to allow and permit Active X file access).

    Administrators and Users COULD alter systems settings to disable Active-X warning dialog prompts, or an adjustment by installer patch could be performed. The HASH HTTP Request web page save method is better because it requires no adjustment of any kind.

  2. Admin Says:

    document.location.hash is supported from +IE4; Extra reading about URI HASH (fragement identifier, see ), and other uses:

    http://www.w3.org/Library/src/HTAnchor.html
    http://www.w3.org/TR/relations.html
    http://code.google.com/p/reallysimplehistory/
    http://www.w3.org/TR/html4/types.html#h-6.2
    http://www.w3.org/TR/xhtml1/#C_8
    http://www.w3.org/TR/xhtml2/mod-hyperAttributes.html
    http://www.w3.org/TR/xhtml2/mod-meta.html#sec_23.1. and
    RE: http://www.w3.org/TR/hash-in-uri/#d0e462
    2.6 The Naked Hash-Ref
    As the final item in the usage scenarios as seen on the Web , this section documents the use of a single # sign as the value of the href attribute on HTML anchors. This can be thought of as a relative URI with a null fragment identifier. Web sites wishing to override the default-target behavior of anchors use this when attaching a JavaScript event-handler to anchor elements for mouse-clicks. The only justification to place a naked # as the value of the href attribute appears to be to avoid anything showing up on the browser status bar as the user activates the link. Note that this idiom also creates significant hurdles for non-mouse users of the Web.

    RE: RFC1866
    7.4. Fragment Identifiers
    Any characters following a `#’ character in a hypertext address constitute a fragment identifier. In particular, an address of the form `#fragment’ refers to an anchor in the same document.
    The meaning of fragment identifiers depends on the media type of the representation of the anchor’s resource. For `text/html’ representations, it refers to the <A> element with a NAME attribute whose value is the same as the fragment identifier. The matching is case sensitive. The document should have exactly one such element.

    RE: URL length of 2,083 characters in Internet Explorer, and form application/x-www-form-urlencoded to text/plain should not apply.

    KitCADi3ie5.exe will, when finding a single # symbol on the URI during HttpRequest IO output single a Blank line (Linux \n, and C++ \r\n are saved as TEXT \r\n).

  3. Admin Says:

    Q. 29 (current) VS 7 ? 4:1 aprox;
    A. Compressed KP2 will be termed a kpx file for transmission only, and processes something like (examples below may NOT be a valid fragment identifier):-

    test.html#KITCADI3%5FHttpRequestIO%5FBEGIN
    test.html#AUTHKEY%3D123456789
    test.html#AUTHPASS%3D1
    test.html#ACTION%3DKP32
    test.html#KitCAD%2Di3%2DKGC%2D2%2E27%2E19%2E66%20%5FKitCAD2%5F%5FObjects%5FFile%5F%5FJobNumber%5F%5FClientName%5F%5FEstPrice%5FComment%5F%5F
    test.html#0%5F%5Fbcw1a1%5F%5FFile%5F%5FTop%5FLeft%5FWidth%5FDepth%5FRotation%5FRepeats%5FHeight%5FHeightFrom%5FxdTop%5FxdLeft%5F
    test.html#KITCADI3%5FHttpRequestIO%5FEND

    Which, is Decoded (validated) into something like
    #KitCAD-i3-KGC-2.27.19.66 _KitCAD2__Objects_File__JobNumber__ClientName__EstPrice_Comment__0__bcw1a1__File__Top_Left_Width_Depth_Rotation_Repeats_Height_HeightFrom_xdTop_xdLeft_

    And Re-coded into a KP2 file

    #KitCAD-i3-KGC-2.27.19.66 _

    [KitCAD2]
    Objects=1
    File=
    JobNumber=
    ClientName=
    EstPrice=
    Comment=

    [0]
    name=bcw1a1
    File=C:\Program Files\Kitchen\Objects\BC2di_1000w_600d_903h_0hf.kpd
    Top=56
    Left=122
    Width=1000
    Depth=600
    Rotation=0
    Repeats=1
    Height=0
    HeightFrom=0
    xdTop=0
    xdLeft=0

    * NOTE : The %20 value is removed from the File path names. While this is kind of the correct format used by kpx transmission – many changes may occur (Could be far smaller); Check back for revisions to this comment!

    New values will be added for IO in the NEXT UPDATE of KitCADi3ie5.exe; which are

    #%01%02 is same as START
    #%03%04 is same as END
    #%18 is cancel, same as #ACTION=CANCEL

    🙂

  4. Admin Says:

    Uploaded updates.. but it needs more work in the area of file OPEN.

    Currently only 29:7 compression is only enabled for 227 mode. Once file OPEN function is intergrated into KitCADi3ie5.exe (over 600Kb currently) then more work will be done on the SAVE function to reduce it to a single GET request (something like +29:7:1-5 that is enabled for both i3 and 227 modes), after a multi-kpx processor is added (which is to collect a HISTORY over time for loads on data changes to the KP2 file that is stored in a structure within KitCADi3ie5.exe (memory) for quicker processing – no need to send data, just the reqest for action upon a datastore.

    🙂

  5. Admin Says:

    Updated fragment identifier function call of #KITCADI3_HttpRequestIO_FILEOPEN for opening KP2 files after converter processing by kp2html.exe (2004-2006). EG:

    test.html#KITCADI3_HttpRequestIO_FILEOPEN
    test.html#ACTION=DIALOG
    Wait 3 seconds, and reload ‘../KitCAD i3.html’, results in KP2 file being loaded.

    or (below, is fully not enabled at this time)

    test.html#KITCADI3_HttpRequestIO_FILEOPEN
    test.html#ACTION=http://example.com/somefile.kp2 ????

  6. Admin Says:

    Added mode swtich function on the KitCAD i3 OPTION window to allow mode changes without altering over-rides in preset config files.

    KitCADi3ie5.exe–>>TEST–>>Option–>>KitCAD i3 mode (default)
    The default mode of i3 is the URL of:
    test.html#KitCADi3_IO

    KitCADi3ie5.exe–>>TEST–>>Option–>>Enable KitCAD i3 227 mode
    The 227 enabled mode is the URL of:
    test.html#KitCADi3_227

    Note: Option’s are cleared when loading a new drawing (see over-ride below for setting the default mode);

    To enable 227 mode (requres KitCAD2), edit the file of C:\Program Files\Kitchen\KitCADi3\Test\_i3exe.default and change i3exemode = “i3”; to be i3exemode = “227”;
    Then edit the file of C:\Program Files\Kitchen\KitCAD\lang.inf (after running KitCADi3ie5.exe, and exit), change the line of 6000-mode=i3 to be 6000-mode=227
    After setting the mode to 227 (as above), KitCADi3ie5.exe will use KitCAD 1/2 software where possible (EG: kp2vrml97.exe and quote.exe).

  7. Admin Says:

    The HASH fragment identifier method generates a windows Click sound each time a Hash command is sent.

    As-a-work-around the sound output device can be turned off (the prefered option is to alter the registry/control panel options for using no sound file – see IE sound links below. Using sound files takes more time.)

    To disable the sound Click:- Start->Control Panel->Sounds, Speech, and Audio Devices->Sound->Sound and Audio Devices (displays dialog box)->Sound (tab). Under the Program events scroll until you find Windows Explorer Start Navigation, and change the sound file to NONE before pressing OK.

    An advanced option is to search the registry for the text of “C:\\Windows\\media\\Windows Navigation Start.wav” or “C:\\Windows\\media\\Windows XP Start.wav” and change it to be “” (no text).

    A third option is to record a blank file in place of wav sound file (but not advised).

    See for more informaiton :-
    IE sounds support http://support.microsoft.com/kb/183912
    Remove IE sounds pack 4/5 http://support.microsoft.com/kb/182980

  8. Admin Says:

    Moved Active-X warnings from inital startup to other parts of the program process. See the KitCAD i3 file://localhost/ TEST version [3] kp2html.exe update notice for more information.

  9. Admin Says:

    Uploaded a webform POST example. The example uses the KPX file format and a web POST command to transmit data to the C++ interface.

    See Post C++ Source fix for KitCADi3ie5.exe for more information

  10. Admin Says:

    Will attempt (if the POST example does not workout) to insert the Stop command to prevent click navigation sounds.

    EG: CppWebBrowser1->Stop();

  11. Admin Says:

    Updated source code to use DOM reading method for extracting data from webpage frame.

    Did not get enough time to attempt using the Stop() command.

    See Post C++ Source fix for KitCADi3ie5.exe for more information about using the webform POST method

  12. Admin Says:

    Added IO #HASH commands to KitCADi3ie5.exe 1.4.16.34, of :-

    #KITCADI3_IO_WIDTH=<integer>
    #KITCADI3_IO_HEIGHT=<integer>
    #KITCADI3_IO_CENTER

  13. Admin Says:

    Updated KitCAD i3 to enable no-Active-X warning for file I/O, see KitCAD i3 file://localhost/ TEST version [4]

  14. Admin Says:

    For information relating to search engine #! hash ajax crawling methods; See https://developers.google.com/webmasters/ajax-crawling/docs/specification