Help:Contents

From Vectorworks Developer
Jump to: navigation, search

.Help:Contents|Help ..Help:Contents|General Help ..Help:Adding Article|Adding Article ..Help:Adding Function Reference|Adding Function Reference ..Help:Adding General Function Reference|Adding General Function Reference ..Help:Adding VCOM Function Reference|Adding VCOM Function Reference ..Help:Adding VectorScript Function Reference|Adding VectorScript Function Reference

Here are some brief instructions to help you add content to the Wiki. It is fairly easy to do, and once you get the hang of it, new content can be added in very little time.


Adding to the Wiki

Adding a new page is easy.

  1. Go to the page you want the new page to be linked from.
  2. Click on the edit tab to edit the page. Add a link to the page you wish to create.
    The way to create a link is to place the new page's title in brackets. [[Page title]]
  3. Save the page. Your link will show up as a red link which, when clicked, will bring you to an edit page for your new page.
  4. Edit and save your new page.

Page Name

The actual type of the reference page (is it VectorScript or SDK or VCOM) is determined by the category in which the page exist.

The category is represented in the name before the semi-colon in the name.

For example "SDK:Something" is a page "Something" in category "SDK".

IMPORTANT Be careful when naming pages. The name is very important!

The first category in the page name denotes the where the page belogs:

VCOM:VCOM (VectorWorks Component Object Model) reference pages uses categories to denote location of the interface or function.

  • VCOM:VectorWorks:namespace1:namespace2:IInterface
':' as delimiter of categories
'IInterface' is a page in 'VCOM'. The interface is defined in namespace hierarchy "namespace1::namespace2"
  • VCOM:VectorWorks:namespace1:namespace2:IInterface::Function
':' as delimiter of categories, and '::' as delimieter of function belonging to
'IInterface::Function' page is a function named 'Function' inside interface 'IInterface'

Page Contents

Every page should have contents at the top. The contents is automatically generated from WIKI. All you have to do is to add the following code at the top of the page:

<div class="rightmenu">
__TOC__
</div>

Formatting Text

When formatting text in a page, you can use standard HTML formatting syntax. The Wiki also has its own method of formatting which, in most cases, is easier to use than HTML formatting.

Code blocks

You can put pascal, python or C++ code blocks by using <code lang="pas">, <code lang="py"> and <code lang="cpp">

VectorScript (Pascal)

<code lang="pas">
procedure MyTest(a : INTEGER)
begin
  Message( 'this is pascal code block' );
end;
</code>

Looks like this:

PROCEDURE MyTest(a : INTEGER)
BEGIN
  Message( 'this is pascal code block' );
END;

Vectorscript Python

<code lang="py">
vs.Message('this is python code block');
</code>

Looks like this:

vs.Message("this is python code block")

C++

<code lang="cpp">
void myFunciton(int a)
{
   function( "this is C++ code block" );
}
</code>

Looks like this:

void myFunciton(int a)
{
   function( "this is C++ code block" );
}

XML

<code lang="xml">
<a>
   <b attr="value">
     something
   </b>
</a>
</code>

Looks like this:

<a>
   <b attr="value">
     something
   </b>
</a>

Code block note

You can place a note in the code block, that shows up as red text referring to a numbered list after the block

<code lang="cpp">
%1
 <nowiki>void myFunciton(int a)
{
%2
 <nowiki>   function( "this is C++ code block" );
}
</code>
*Note #1 - explain note 1
*Note #2 - explain note 2

Looks like this:

Note #1, see after the code block.
void myFunciton(int a)
{
Note #2, see after the code block.
   function( "this is C++ code block" );
}
  • Note #1 - explain note 1
  • Note #2 - explain note 2

Function Definitions

You can put C++ function definition is special block so it will be formatted each parameter on new line to show the function more clearly:

<funcDef lang="cpp">
extern “C” long plugin_main(long action, long message, long& userData, CallBackPtr cbp);
</funcDef>
extern “C” long plugin_main(
long action,
long message,
long& userData,
CallBackPtr cbp);

or VectorScript definition:

<funcDef lang="vs">
FUNCTION Function(objectHd : HANDLE; a, b : REAL; VAR text : STRING) : HANDLE;
</funcDef>
FUNCTION FUNCTION(
objectHd  : HANDLE;
a, b  : REAL;
VAR text  : STRING) : HANDLE;

Lists

For example, to create lists, HTML calls for various tags, like, <ol>, <li>, </li>, </ol>, etc. But the Wiki makes creating lists easy. For numbered lists, just prepend a # character at the beginning of each line. For bulleted lists, prepend a * character. For example:

#One
#Two
#Three

becomes:

  1. One
  2. Two
  3. Three

and:

*One
*Two
*Three

becomes:

  • One
  • Two
  • Three

You can combine * and # to achieve increased levels of indentation. Also, the : character can be used to increase indentation without a bullet or number appearing in front of the text.

Indenting

Use ':' symbol to specify the idention of a block of text.

For example:

:Text paragraph1
::Another text paragraph
:Text paragraph2

Is shown as:

Text paragraph1
Another text paragraph
Text paragraph2

And you can use it for lists:

*item 1
:text
::more text
*item 2
:text
::more text

Is shown as:

  • item 1
text
more text
  • item 2
text
more text

Creating Tables

Wiki Style Tables

Here is sample code for creation of a table:

{| border=1
! col1 !! col2 !! col3
|-
|data1-1 || data1-2 || data1-3
|-
|data2-1 || data2-2 || data2-3
|}

Looks like this:

col1 col2 col3
data1-1 data1-2 data1-3
data2-1 data2-2 data2-3

List Tables

In this wiki you can use 'listTable' tag to create sorted or unsorted tables of values. Every line defines an entry in the table.

The tag has following parameters. If you don't specify parameter, it's default value will be used:

Parameter Default Value Description
indent 0 Indend of the table from the base level.
cols 4 Number of columns in the table.
sorted true If 'true' the table is textually sorted; 'false' the table is not sorted.


Here is example of sorted table, indented once, with four columns:

<listTable indent="1" cols="2">
m
a
[[c]]
[[link_to_b|b]]
</listTable>

Looks like this: (Note the links are also sorted by their name. If there is '|' in the link, the visible text is used for sorting)

a b
c m

Line Lists

List tables is the simplified way of providing tabular lists.

ident parameter to the list table determine the amount of indenting that the table will have against the paragraph in which is defined.

There are two types of table list, two and tree elements:

Two elements

A <line> tag defines two following lines that contain the text for each element. As result you get a multi-line table with two columns:

<lineList ident=1>
<line>
line1-element1
line1-element2
</line>
<line>
line2-element1
line2-element2
</line>
</lineList>

Looks like this:

line1-element1 line1-element2
line2-element1 line2-element2

Three Elements

A <line> tag defines three following lines that contain the text for each element. As result you get a multi-line table with three columns:

<lineList ident=1>
<line>
line1-element1
line1-element2
line1-element3
</line>
<line>
line2-element1
line2-element2
line2-element3
</line>
</lineList>

Looks like this:

line1-element1 line1-element2 line2-element3
line2-element1 line2-element2 line2-element3

Using Templates

Templates are Wiki pages that act like #include files for other Wiki pages. They are used to reference a common set of text.

To place a template in a page, reference it using double curly braces, such as {{MyTemplate}}. Creating a template is very similar to creating a regular Wiki page:

  1. Go to the page you want the template to be linked from.
  2. Click on the edit tab to edit the page. Add a template link to the template you wish to create.
    Remember to use curly braces rather than brackets, ie: {{Template title}}
  3. Save the page. Your template link will show up as a red link which, when clicked, will bring you to an edit page for your new template.
  4. Edit and save your template.

Specific Pages

Additional info

The Media Wiki FAQ has more explanations of how to do this and other editing processes.

Also useful, is the MediaWiki Handbook.

Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox