Jump to content

writing data from vectorscript in a worksheet


Recommended Posts

Hi,

 

does there exist any possibility to write data from a Vectorscript-Script directly into an existing Vectorworks-worksheet?

 

I didn't find a corresponding command. (maybe because the command doesn't exist)

 

Alternative would be using "runscript" directly from the worksheet.

 

Therefor I need to read out column A and insert it as variable in the script.

(For example - A1: 1 -> "there are x 1-room-apartments")

 

Link to comment

works nearly fine, however SetWSCellFormulaN only works with Strings or Char - Variables.

I'd like to insert an Integer-Value.

 

How could I do that? Is there any possibility to transform an Integer-Value into a String? Or feed a String-Variable with Integer-content?

 

EINZW: INTEGER;

 

    inString := EINZW;          
    SetWSCellFormulaN(worksheet, zeile, 2, zeile, 2, inString);

 

 

Link to comment

In Vectorscript (and probably all of VW), Integers (and LongInts) are a subset of Reals. That means that anywhere a real is specified you can also use an Int or LongInt.

 

If a LongInt is required you can use either an Integer or a LongInt.

 

If an Integer is required, you can only use an Integer (unless someone else wants to do the multiple paragraph explanation of how a Boolean is really an subset of integer and can be used....). ;-)

 

 

  • Like 1
Link to comment
  • 2 months later...

Actually, what I said above about Reals/Integers/LongInts is a little misleading.

 

Any Vectorscript function that takes a Real as a non-changeable INPUT can use an Int or LongInt instead of the specified Real value.

 

Anything that OUTPUTS a Real (or uses a Real that is changeable [using a VAR in the function/procedure declaration]) will require an variable declared as Real.

 

So an Integer can substitute for a Real as an input, but if you want an Integer from a Real output you will have to use a Trunc or Round function.

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...