Jump to content

Basic plug-ins


Recommended Posts

I'm trying to create a plug-in to make adjustable symbols. For instance, for a project I may have many artifact cases with similar details but various sizes. I'd like to use a symbol where I can type in different dimensions for each instance.

It seems like code-writing skills are essential and despite the reams of material Nemetscheck provides regarding VectorScript, everything they describe is either painfully obvious or completely Greek to a non-tech guy like myself. I couldn't find any step by step instructions.

Can anyone briefly describe the process in plain English?

Link to comment


As Chris said, knowing what a piece of script does and looking at the code to try to see how it is achieved can be helpfull. You can also use the script button in "create plug-in" to see other examples.

I learned a lot from a book on Pascal. Vectorscript is based on Pascal, and the syntax is pretty much identical. You can learn a lot about the basic structures and coding in general this way. The one I used is called Programming in Pascal by Nell Dale.

I would suggest that you first write a script that simply makes the basic drawing of one of your symbols. This is chapter 3 - "Document Scripts" in the Custom Solutions book (version 8.5). You can make it adjustable later.

The most important v-script resource can be found in the vectorworks help files under vectorscript: the function reference.

With a little bone-headed determination, much trial and error, and a few questions asked here you will succeed. Step by step instuctions in plain English is beyond my abilities.

[ 07-02-2002: Message edited by: ccroft ]

Link to comment

I have found that the plug-ins that come with VW are often quite old. Also, they are VERY poorly commented. I have a door script (which still isn't playing all that nicely with switches from black background to white) that allows user-defined door width, sidelites or no, user-defined sidelite width, etc. It's fairly complex for a newbie, but it's a good mid-ground. I also have a grid circle script that is very simple. (note: avoiding spam bots) If you send an Electronic MAIL to me at 'dclarke''@'and then'aciarchitecture'followed by '.com', I will reply with the .vso's (PIO script file) attached.

BTW, there is little response in the VS forum compared to the General forum.

Link to comment

The reason for the lack of VectorScript help from anyone at NNA isbecause the few guys that do it in-house are buried in work. Second NNAjust refuses to put any resources towards VS because they think NO oneuses it. So why bother supporting the their users. All the newer VW's userson this board who would like to learn it and use it don't have a shot inhell, honestly. How could you possibly learn with what NNA provides, you can't.Also now that VS is an in-house development tool NNA doesn't want anyoneto know how they created any of their plug-ins and lock them so everyoneis SOL. Examples are by far the best way to learn how to write VS. Along time ago NNA provided books with examples of how to write VS. The book Ihave from MC version 4 is still the best piece of information I haveabout writing VS. Yea outdated now, but far better than what available now.

The bottom line is NO one will adopt VS if NNA doesn't give it's users theability to learn it.

Makes you question if they do want you to learn it doesn't it? Eversince NNA started using VS as the in-house development tool did the openscripts and books go away. It also answers why they decided to add somany new features to VS as well, the in-house guys needed it.

The reason I try and spend time answering questions about VS on this board is because I know your not going to get answers from NNA. I feel for the people whorealize the power in VS but don't have a clue as to where to start. Youcan count on 1 hand the number of times anyone from NNA has answered aquestion about VS on this board. Goes back to the support... it aint there!

I find the argument were not going to put support to something people don't usea poor excuse. You have to have the egg before you can have the chicken. You canlead a horse to water, time and time again, but you can't make them drink.

It would not cost NNA a great deal of money to have someone one really watch the board and answer VS questions as well as provide examples. Also who would pay another 20 bucksfor a VS book to go along with the next VW's release, I sure would, and I already know VS.

My 2 CentsFuge

[ 07-03-2002: Message edited by: Fuge ]

Link to comment

As much as I hate VectorWorks (and AutoCAD, mind you) for the unreliability, you can't NNA. I believe that the resources they have for working on VW are already stretched quite thin. Consider how many more bugs VW would have if people were taken off of VW dev and put onto VS support.

Additionally, any given script is an unknown, as opposed to VW, whose builds are in KNOWN states, with known characteristics that are the same from one machine to another. Everybody doing VS is making up his/her own code. How do you support that?

As for VS per se, I think that, based on the code-like nature of VS, a user interested should already have an understanding of programming. Once you have acquired that from somewhere else (unfortunately), then -- YES -- examples are good ones, provided that they are well-commented. Many scripts available are messy and cryptic with no commenting. I emailed some of mine to the poster here; do they help?

I have a MiniCAD book that is a compendium of all the VS functions. Is there a VW9 equivalent? I hate having to click on the button while editing a script, then select categories, just to find a function.

Link to comment


Originally posted by TiTaNiuM sAMuRai:
Is there a VW9 equivalent? I hate having to click on the button while editing a script, then select categories, just to find a function.

Why not use your web browser and the files in the VSReference folder? that way, you can have the reference and the editing window open at the same time.


Link to comment

Hello all,

just to say that if you need more help just join the vectorscript mailing list. Great scripters and NNA engineers usually answer your questions there.For VS samples, download some pios posted at vectordepot or read the minipascal manual that came with minicad 7.



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