Jeff Simpson Posted May 12, 2002 Share Posted May 12, 2002 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??? SelectObj(S='TitleBlock');SetRField(?handle?,'TitleBlockInfo','DrawingDescription','ProdLayout'); Quote Link to comment
Alexandre Villares Posted May 12, 2002 Share Posted May 12, 2002 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 ] Quote Link to comment
Alexandre Villares Posted May 12, 2002 Share Posted May 12, 2002 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); Quote Link to comment
Jeff Simpson Posted May 13, 2002 Author Share Posted May 13, 2002 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. JS Quote Link to comment
Jeff Simpson Posted May 13, 2002 Author Share Posted May 13, 2002 Thank you for the insight and help. JS Quote Link to comment
Recommended Posts
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.