d/Code - Sketchup-Plugin - Logo

Valid for version 1.0 RC1
of Sketchup plugins d/Code.

Table of contents

Up | Down


Features

Up | Down


Requirements

System requirements

The d/Code plugin is usabel with Windows an Mac operating systems. For that you have to care about the requirements Sketchup is asking to the system.

Software requirements

You can use d/Code with Sketchup Pro 6 and Google Sketchup 6.

Up | Down


Dependencies

d/Code depends on one Ruby library, one modified script and some parts of an original Ruby:

Furthermore the following files have to resist in the "Plugins" folder of Sketchup: These files resist in this folder by default after a regular Sketchup installation.

Up | Down


Installation

Plugin installation

  1. Close all running instances of Sketchup.
  2. With the file manager navigate to the "Plugins" folder of your current Sketchup installation. If this filder contains the file "dcode_loader.rb" and/or the folder "dcode", save them to a place of your choice and delete it from the Sketchup folder.
  3. Copy the file "dcode_loader.rb" and the folder "dcode" to your "Plugins" folder of your current Sketchup installation.

Installation of required libraries

The required libraries do not need to be installed manually, they will be shipped with this plugin and resist in the folder "dcode/lib"

Installation of the Sketchup Ruby Scrambler

If you have access to the Sketchup Ruby Scrambler, you can copy it to one of the following folders (or both):

  1. "Plugins"
  2. "Plugins/dcode"
After that you will have access to its functionality from d/Code.

Up | Down


User Interface

MenĂ¼

d/Code menu
  1. Plugins: This is the root menu in whicht the d/Code menu is included. You can customize it by modifying the language file "dcode/lang/decodede.strings"
  2. d/Code: This is the d/Code submenu.
  3. Show: Choosing this item opens the d/Code window.
  4. Set default window: If oyu choose this item, the d/Code window will be positioned on a defined position with a defined size. For that the current screen resolution you are using will be determined and the window will fit into it. This functionality is useful i.e. if you use two computer displays and have had the d/Code window on the second monitor - and later you disconnect this monitor. That will result in an invisible, nealy unreachable window. By clicking the menu item you can get the window back.
  5. How to use: If you choose this item you will reach the d/Code help.
  6. Shortcuts: Choosing this item results in a small window showing the defined keyboard shortcuts for using with d/Code orderd:
    1. by shortcut
    2. by command
  7. About...: Choosing this item shows a small window which includes version number of d/Code among other things.

Toolbar

d/Code toolbar
  1. Handle: The handle (the small vertical bar on the left side of the button) is used to move and position the d/Code toolbar verschieben.
  2. Button: Clicking this button opens the d/Code window.
  3. Tooltip: By moving your mouse over the button a tooltip will be shown explaining the function of the button.

Window

d/Code user interface
  1. Load: If you click this button, a file chooser is displayed, in which you can choose a file to load. d/Code reads the whole file in one step, the file won't stay opened all the time.
  2. Save: Choosing this button will save the contents of the input field to the file opened by clicking the Load button. Keep in mind, that this only is possible, if there aren't changes to the content. Changes to the content are made by hand. Pressing the buttons for the different views (16 to 19) do not change the content - your code will stay the some in its contents.
  3. Save to: Clicking this button opens a file chooser for saving files. You enter a file name for the file the code from the input field should be written to.
  4. Save as .rbs: If you have installed the Sketchup Ruby Scrambler to the "Plugins" and/or d/Code folder an the current shown code is Ruby code, this button is available. If you have made any changes to the Code and haven't updated the view or executed the code and you want to have these changes within your .rbs file, please use one of the mentioned buttons. Clicking the "Save as .rbs" button will than open a file chooser for saving files. You here have to enter a filename for a .rb file to which the code from the input field should be written. After that the .rb file will be translated into a .rbs file - the .rb file stays conserved. The functionality of this button only is available for Ruby code.
  5. Export HTML:Clicking this button will open a file chooser for saving files, in which you can enter a HTML file name. In that file the HTML output of the window will be written.
  6. Clear: Clicking this buttons removes all contents from the input and output fields.
  7. Shortcuts: When clicking this button results in a small window showing the defined keyboard shortcuts for using with d/Code orderd:
    1. by shortcut
    2. by command
  8. Filename: In this area the filename of the current loaded file is displayed, if the code wasn't manipulated from the input field. This file name you can click. The following action is equal to a doubleclick on the file in a file manager (i.e. Windows Exploerer).
  9. Select all: Clicking this area selects all contents from the input field.
  10. Input field: The input field is used to enter code. It has a horizontal and a vertical scrollbar. Line breaks have to be entered by hand by pressing the Return / ENTER button as it is common in each ordinary editor. Automated line breaks or wraps do not take place.
  11. Update: Clicking this button gives the contents from the input field to the plugin to show in in the Code field. If you have not selected the view "Raw", the code will also be written formatted to the input field, if the code is Ruby code. If the code from the input field wasn't manipulated, it will be treated as if it is the code from beginning (loading a file). If you have executed the code and the output field is visible, it will remain when clicking the "Update" button.
  12. Reset: This button is used to undo changes made to the code in the input field. It is only possible to undo changes till the last update / execute.
  13. Execute: Clicking this button gives the contents from the input field to the plugin for execution. Unless the view "Raw" is selected, the code will be formatted. Furthermore the output field will be opend, if it isn't already open. In the output field you can see the step-by-step execution of the code and possible errors.
  14. Code field: The code field contains teh contents of the input field with respect to the choosen view. The field has a horizontal and vertical scrollbar, lines won't be automatically breaked.
  15. Quickinfo: If the view "Raw" isn't choosen, you will see some quickinfo while moving the mouse over the code from the code field. The quickinfos contain the type of the hovered element.
  16. Raw: Clicking this button will show the Code as it was entered (by hand or from file). If the code was manipulated while having a view enabled different to "Raw", and this code was executed or updated, the "Raw" view will show the formated code (if it is Ruby code).
  17. Highlighted: Clicking this button will format (Ruby code) and highlight the current code.
  18. Decoded: Clicking this button will show a view of the code if it is decoded. Code which can't be decoded because it is decoded will be shown formatted and highlighted. This only works for Ruby Code.
  19. Encoded: Clicking this button will show a view of the current code when encoded. This only works for Ruby code.
  20. Select all: Clicking this area selects all contents from the input field.
  21. Output field: This field shows the step-by-step execution of the entered code and the results of the single steps. Also you can see error messages in this field. The output field only has a vertical scrollbar, the contents will be wrapped.

Window > Preferences

You will reach the following window by choosing the menu entry "Window > Preferences"

Preferences for d/Code
  1. Entry and checkbox: This is the entry for the d/Code Sketchup Plugin. The checkbox is used to enable/disable loading of the Plugin when Sketchup starts.
  2. Information: This field shows a short description ot the d/Code plugin.
  3. Version: Here you can see the current used d/Code version.
  4. Created by: This field shows the creator (author, programmer) of the plugin.
  5. Copyright: Some remarks on copyright.

Up | Down


Usage

First steps

  1. Start Sketchup.
  2. If you can't find the d/Code toolbar, check the following:
    1. Is the plugin installed as described?
    2. Is it active? Check this by choosing "Window > Preferences > Extensions" and control, whether the checkbox on the left side of the d/Code entry is checked.
    3. Check the menu "View > Toolbars" for the d/Code entry is enabled.
  3. Click the button on the d/Code toolbar, the d/Code window will open.
  4. Now click on the "Load" button in the d/Code window and choose a file, mabe a Ruby or HTML file.
  5. Change the contents in the Input field.
  6. Click the "Update" button and watch what will happen in the d/Code window.

In case an error occurs

If an uncommon error occurs, you can send its error message to the publisher of this plugin, that he can regist the and fix the error. Please describe the error as good as possible: Circumstances, what have you done right before the error occured, how often the error occured, is it repeatable etc.

Up | Down


d/Code Help, Last Update: 31.01.2008
© 2008 Mario Pehle, error initus. All Rights reserved.