Jump to content
Developer Wiki and Function Reference Links Read more... ×
Sign in to follow this  
MullinRJ

Problems w/ hMoveForward & hMoveBackward

Recommended Posts

Has anyone played with hMoveForward and hMoveBackward in VectorScript (new as of 8.5.2)? I am getting varying results in the amount an object moves dependent on the type of object being moved. Symbols behave nicely, whereas Rectangles and Polys do not. I could elaborate on my observations, if anyone is interested, but I just want to know if anyone has tried using these commands?

Share this post


Link to post

I have not used these two commands as of late, but are you forcing a screen redraw in your script to make sure your seeing what's actually happening?

Just a thought.

Share this post


Link to post

No, the screen redraws automatically at the end of my script, but the objects don't move properly when multiple objects are selected. I did receive a reply from Tech Support. Here it is:

<<<

Mr. Mullin:

> I have been trying to use two new VectorScript procedures to no avail -

> hMoveForward and hMoveBackward. In my efforts to determine how these

> procedures were functioning/failing, I ran across some other anomalies that

> seem to have been around for quite some time. The VectorScript commands

> Forward/Backward/MoveFront/MoveBack all have quirks that manifest themselves

> when multiple objects are selected. Strangely enough, when the same commands

> are invoked using the DoMenuTextByName( ) procedure, slightly different

> results occur.

In response to you concerns, we have used your test file under VW 8.5.2 and

replicated the problems described. However, using VW 9.0, we were unable to

replicate the problems save for one issue (described below). The problems

described have been corrected.

Regarding outstanding issues:

1) With respect to the movement of multiple selected objects using forward

or backward commands, VW treats the multiple selection as a single object

which is move forward or backward in the stacking order.

We have entered this issue in our bug list, but it will not be addressed

until VectorWorks 10 at the earliest.

2) The increasing script run times are the result of the undo system storing

the object shuffling events in the undo list.

You can eliminate this performance penalty by setting the number of undos to

zero. This can be set directly from a script by using the function call

SetMaximumUndoEvents().

If you should have any questions regarding these or other issues, please

feel free to contact us.

>>>

I was trying to write a script that would insert a point in a POLY when I encountered the problems with hMoveForward & hMoveBackward. I am able to properly insert a point in a POLY except for maintaining the stacking order of the POLY with respect to the rest of the drawing. This is because I need to create a new POLY with the added point and delete the old POLY. Of course new objects are created on top, and I was trying to move the object back in the stacking order where the original was (yes, it is a convoluted approach but it works except for the hMoveBackward problem). I can get by without hMoveBackward, but I can't make a perfectly generic solution without it. I was hoping to make a Plug-In tool with this approach, but, c?est la vie, the brick wall cometh. There was one other minor shortcoming to my endeavor, VectorScript does not have a way to query/set the OPENPOLY/CLOSEDPOLY attribute. All other attributes, including attached records, can be copied to the new object.

If anything here is of interest to you let me know. I will be more than happy to share what I've found.

Raymond

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
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.

×