Jump to content

A little help starting...

Recommended Posts

I have been trying to understand and begin some rudementary VectorScripting. I am trying to change data associated to a symbol. I have found the two following commands and have gotten the first one to work. I can't figure out the handle thing, I thought it was the 'GetHandle' command, but found it was obsolete. Any guidance???


Link to comment

Hi Jeff,

Handles are special data structures that serve as unique identifiers to objects in a VW file.

This is a bit tricky, but have a look:First I define a new function called SetMyInfo, then I ask VW to apply it to each drawing object that complies w. the criteria (S='...'). This is a special procedure (FEO-ForEachObject) that passes a handle to SetMyInfo.

{*}Procedure SetTest; {---}Procedure SetMyInfo(ObjHandle:HANDLE);{---}BEGIN{---}SetRField(ObjHandle,'TitleBlockInfo','DrawingDescription','ProdLayout'); {---}END;{*}BEGIN{*}ForEachObject(SetMyInfo,(S='TitleBlock'));{*}END;Run(SetTest);

[ 05-12-2002: Message edited by: Alexandre B A Villares ]

Link to comment

I used the {*} and {---} to highlight the different parts of the script, as there is no TAB indentation available on this web-based board, you can remove them!

Things between { } are 'comments' with no influence on the code.

About the procedure difinition structure:

Procedure MainProgram;{Declare your variables}VARX: REAL; {example}(...)

{Define your subroutine here}Procedure MySubProcedure;VAR(...)BEGIN(...)END;

{start your Main Procedure here}BEGIN (...) {your main program here}END;

Run (MainProgram);

Link to comment

Thank you.

Your right it is a bit confusing, but I will try read a bit about each procedure in the manuals and try to figure it out.

If anyone would like to start me with a little explanation about the structure (i.e. procedures, {*} symbols, loops, etc) in this example, it would be welcome.

Thanks again.


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.

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...