Jump to content
Sign in to follow this  
JRoth

Editing exist. scripts

Recommended Posts

Hi, no dumb question. Most PIOs in VW 9 are code protected so you can't edit them. What you can do is to copy a PIO from VW 8 into VW 9. Note that some code will not work without editing.HTH, Hannes

[ 08-14-2002: Message edited by: Hannes ]

Share this post


Link to post

I am so disappointed/irritated. What rationale exists for NNA to remove this _huge_ boon to users? It's not as if anyone is making $ by tweaking their scripts and selling them. And, since no VS for Dummies exists, my primary understanding of how VS works is through staring at NNA's scripts until they make sense (or I pass out).

I'm simply incredulous. I expect this from Autodesk, not NNA.

Share this post


Link to post

Join the club of disappointed/irritated users. NNA makes Vectorscript more powerful each release, they also make it harder to learn, especially for the new comers.

Good luck learning VS and ask a lot of question here or on the vs email list. Thereare a lot of helpful vscripters

Fuge

[ 08-14-2002: Message edited by: Fuge ]

Share this post


Link to post

OK, sorry if this is a dumb question, but:Why can't I edit the scripts that come with VW 9.5? I just want to tweak - make the point size smaller in the databox, things like that. Am I missing something, or has one of my favorite VW aspects gone away?

[ 08-14-2002: Message edited by: JRoth ]

Share this post


Link to post

Sadly, I think the best resource is to get a copy of the MiniPascal manuals (last printed version I believe was v7). Then print out the PIO chapters from the online help in v9 to get up to speed with the new features. It really is a shame that industry-wide software is get more complicated and documentation is getting more scarce.

I for one just can't stand reading manuals on a scrolling computer screen while constantly alt-tabbing between Acrobat and the application your working with.

Share this post


Link to post

Hello,

I read your original message. For the corrections you like to make on those standard PIO's I think you do not need to have access to the PIO's itself. By the way, those standard PIO's are all protected and I think with good reason (I do not like to offend someone here).

Inside your Plug In folder you will find the maps named :

DataIncludes

When you open those maps you will find preference files for all your standard PIO's. You can open those files with a simple wordprocessor like SimpleText on the Mac or Wordpad on the PC. When you open those files, you will find a lot of parameters you can alter. But make sure what you are doing and that you edit the correct data file.

I hope you can solve your PIO problem this way. I think it is the easiest way to correct.

In the meantime I wish you a very nice day and very much fun programming VectorScript.

Friendly greetings,

StarGateDesselBelgiumEurope smile.gif" border="0

Share this post


Link to post

OK Stargate,

How do I change the script code for simple window (for example) to draw the 2d object with poly() instead of rect(). This way I believe the object snap 'point' will work, enabling accurate drawings instead of guesswork.

Thanks

Share this post


Link to post

Hello,

I read your message about changing the script code of protected scripts.

As far as I know there is no way of changing that scriptcode. You can try open a protected PIO in a wordprocessor or other program but the only thing you get is an unreadable mess of characters. I tried a lot of possibilities, however nothing worked.

Many people like to make corrections on those standard PIO's which is very understandable. I also asked that question directly to Nemetschek. They told me that without that protection, they cannot give technical support any longer for those PIO's for the simple reason that they cannot track the adjustements made by the user. I know that in AutoCad you can make those alterations. However I see a lot of AutoCad people struggle with it.

But if you want to change all your rects to poly in your drawing that can be done by writing your own PIO.

You can check for a rect with the following instruction :

intType := GetType(hndObject);

When the value of intType is equal to 3 then your object is a rectangle. Get the coordinates of your rectangle by :

GetBBox(hndObject,rlX1,rlY1,rlX2,rlY2);

hndObject is a handle variable pointing to the selected object. rlX1 and rlY1 defines the upper left corner of the object, rlX2 and rlY2 defines the bottom right corner of the object.

The only thing you have to do is to delete the selected object from your drawing :

DelObject(hndObject);

and draw the new rectangle with the Poly instruction :

Poly(rlX1,rlY1,rlX2,rlY1,rlX2,rlY2,rlX1,rlY2,rlX1,rlY1);

Now your rectangular object should be transformed into a Poly. You can do that with all rectangle objects in your document. Select all layers in your document. Establish a handle to the first selected layer and than browse through all your objects. Check each object when it is a rectangle.

I hope I answered your question. If you really want to edit or alter the result objects from those standard PIO's, this is the way you have to do. The decision to protect those standard PIO's is not my responsibility.

Finding workarounds is what programming is all about.

I hope wish you a very nice day and a lot of fun with VectorScript programming.

Friendly greetings,

StarGateDesselBelgiumEurope

tongue.gif" border="0

Share this post


Link to post
Guest

Encrypting the plug-ins that we develop and sell protects our investment.

If you think a particular plug-in needs to be tweaked then send us your suggestions. We may change the plug-in and ship it with a future version so that all users may benefit. Send to: bugsubmit@nemetschek.net

If you want to see the script to learn a scripting technique, then there are other options. We have some sample scripts available on our website. (I'm sure you are aware of this, but thought I would mention it for completeness.) http://www.nemetschek.net/support/custom/vscript/example.html

The VectorScript mailing is an excellent source of information on scripting techniques. http://lists.nemetschek.net/archives/vectorscript-l.html

We are also working on updating the VS Language Guide (pdf) and the VS Function Reference (html) and will make these available in a future version of VW.

Share this post


Link to post

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.

Sign in to follow this  

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...