Jump to content
Developer Wiki and Function Reference Links ×

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?

Link to comment
  • 1 month later...

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

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.

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.

×
×
  • Create New...