Jump to content
  • 3

Solids Objects that use Symbols don't Update


willofmaine

Question

I often use 3D symbols as components of Solids (solid additions, etc.).  But if I update such a 3D symbol, it's then necessary to enter the Edit mode of each and every Solid that uses that symbol before those Solids update accordingly.  I really, Really, REALLY wish Solids would automatically update when the 3D symbols they're composed of are changed.  Their inability to do so simply halves the benefits of building Solids out of 3D symbols. VWIS085

Link to comment

15 answers to this question

Recommended Posts

  • 0

The following script will update all objects in the drawing.  If this is too slow in your drawing, it can be modified to only reset solids. This should to the same as your manually editing and exiting the solids.

 

Procedure ResetAll;

{March 1, 2018}
{© 2018 Patrick Stanford pat@coviana.com}
{Licensed under the GNU Lesser General Public License}

{Resets All Objects in the drawing.}

Var H1:Handle;
	N1:Integer;
	B1:Boolean;

Function PTSReset(H2:Handle):Boolean;
Begin
	ResetObject(H2);
	N1:=N1+1;
	Message(N1);
End;

Begin
	N1:=0;
	ForEachObjectInList(PTSReset,0,2,FObject);
	RedrawAll;
End;

Run(ResetAll);

 

Link to comment
  • 0

Thanks for this, though I couldn't get it to work.  In the Resource Manager I created a new script, then I copied the above and pasted it into the script editing dialogue box.  But when I try to run it in a simple file with a single 3D symbol and a solid made from a couple instances of that symbol, all that happens is it generates a VectorScript Message that says "4".  I don't really ever use VectorScript, so, I'm sure I'm missing something.

 

Also, my project file is quite large.  How would this script be modified to only update Solids?  Thanks!

Link to comment
  • 0

Check Solids.vsm.zip

 

This is a Plug-in menu command that doesn't reset the solids but actually enters them like you would do manually.

When you are working on an older file some solids that were fine to create in an older VW or because of your change in the symbol, may now suddenly be "impossible to compute" so always keep a saved version or backup file before running this command.

 

Have fun.

P.S. It is an 18 yr old command (funny how you forget VW doesn't have a solution for this if you have one yourself). It uses an old technique to run through the document. I'll see if I can speed it up a bit by using foreachobjectinlayer, sometime, not today.

Edited by Gerard Jonker
Link to comment
  • 0
On 3/1/2018 at 1:36 PM, Pat Stanford said:

The following script will update all objects in the drawing.  If this is too slow in your drawing, it can be modified to only reset solids. This should to the same as your manually editing and exiting the solids.

 

 

I couldn't get your script to work.  When I run it from the Resource Manager, it just produces a palette that says "4".  How do I use your script?  Also, how would I modify it to act on solids only?  Thanks!

Link to comment
  • 0
On 3/2/2018 at 1:27 AM, Gerard Jonker said:

Check Solids.vsm.zip

 

This is a Plug-in menu command that doesn't reset the solids but actually enters them like you would do manually.

When you are working on an older file some solids that were fine to create in an older VW or because of your change in the symbol, may now suddenly be "impossible to compute" so always keep a saved version or backup file before running this command.

 

I've downloaded your file and spent some time trying to figure out what to do with a "vsm" file.  As far as I can tell, it's good for creating a menu command, but, I couldn't figure out how to go about doing that...  Thanks!

Link to comment
  • 0

If you got the message then that means that the script tried to reset that number of object. So in your case, it tried to reset 4 objects. Do you only have 4 objects in the drawing? It should have traversed deep into every PIO, Symbol and Group and reset everything. Can you post a sample file?

 

To act on solids only, the script would need to be changed to use the ForEachObject command and the appropriate criteria instead of the ForEachObjectInList command. That will require recreating some of the logic from the ForEachObjectInList command into the PTSReset function. Unfortunately I don't have time to do that tonight. If you have not heard back from me by the end of the week, ping me again and I will try to get you something.

Link to comment
  • 0
2 hours ago, willofmaine said:

 

I've downloaded your file and spent some time trying to figure out what to do with a "vsm" file.  As far as I can tell, it's good for creating a menu command, but, I couldn't figure out how to go about doing that...  Thanks!

Move the VSM file into the Plug-Ins folder in your user folder and then edit your workspace to add the menu command.

 

You may have to restart VW to get it to recognize the newly installed PIO.

Link to comment
  • 0
17 minutes ago, Pat Stanford said:

Move the VSM file into the Plug-Ins folder in your user folder and then edit your workspace to add the menu command.

 

Yes, I figured that out!  (Thank you) and I was just about to post the following:

 

@Gerard Jonker  Okay!  I got it to work.  I just dragged the .vsm file into the Vectorworks Plug-Ins folder in Application Support and restarted Vectorworks.  Then I used the Workspace Editor to add it to the Model menu.  Does the warning that not all solids may be "intact" refer to the "impossible to compute" geometry that you describe in your post?  It seems this only updates solids one layer at a time.  Could it be made to do all layers, or, would that slow it down considerably?

 

Thank you for this!

Link to comment
  • 0
22 minutes ago, Pat Stanford said:

Do you only have 4 objects in the drawing?

 

Yes, it was just a test file in which I created an extrude, made it into a symbol, and then created a solid out of 3 or 4 copies of the symbol.  When I increased the number of symbols, the number in the Vectorscript Message correspondingly increased, as you describe.  I'll recreate the file and attach it.

Link to comment
  • 0

Based on a very quick look, it appears that the ForEachObjectInList call does not go into the Symbols. The description in the Function Reference implies that it should.

 

If it does not go into the symbols, then you actually have 6 objects in the drawing. The free standing symbol, the Solid Addition, and the 4 symbols inside the Solid Addition.

 

Since you need this to enter the symbols the script will need to be more complicated. If you don't hear back by Friday, remind me and I will see what I can do.

Link to comment
  • 0

@Pat Stanford Gerard's menu command actually seems to be doing what I need, with the possible exception that it might be nice to be able to update solids on all layers, rather than just the active layer.  He explains that it "doesn't reset the solids but actually enters them like you would do manually".  I'm not sure what the difference is between that and your script but, ultimately, whatever speedily updates just solids on all layers would be ideal!

 

In the meantime, a while ago you shared a script for updating Marionette objects, which works great (Marionette itself is questionable, but, the script works!...).  One thing I like about Gerard's script is that it's a menu command, easily accessible in all files, rather than a script which needs to be located in the RM and then imported into files.  So, I wondered, could your Marionette script be such a menu command?  Not only is the answer yes, but, I succeeded in making it into a menu command with my very first attempt!

 

Thanks for your responses!  And if you get a chance to update your script, that would be great.

Link to comment
  • 0
23 hours ago, willofmaine said:

@Gerard Jonker  Okay!  I got it to work.  I just dragged the .vsm file into the Vectorworks Plug-Ins folder in Application Support and restarted Vectorworks.  Then I used the Workspace Editor to add it to the Model menu.  Does the warning that not all solids may be "intact" refer to the "impossible to compute" geometry that you describe in your post?  It seems this only updates solids one layer at a time.  Could it be made to do all layers, or, would that slow it down considerably?

 

"intact" indeed refers to "impossible to compute". It was a problem that I ran into a lot when changing form VW version 2009 to 2010 (I think it was) So I included that warning.

There is a ResetObject(h); function you can call. However, it didn't do what I expected it to do when I wrote the script. It might now.

Checking solids inside symbols that might be using other symbols.... It hadn't occurred to me one might want that.

The number of layers is hardly an issue, most time goes into the shear number of objects to check.

Link to comment
  • 0

Hi Will,

 

I added multi Layer support.

Just found out in VW 2018: You only need to use my Check Solids command if you edit your symbols by double clicking them in the layer. If you edit your symbols through the Resource manager it will update all solids using that symbol.

 

I noticed I'm using a top down search in this script. Normally I would start factlayer (first object on active layer) to start a search, but I used Lactlayer. That means checking solids will change the stacking order. If you change the stacking order you have to be careful using ForEachobject-xxxx calls as they also run from first to last. If each object you check is placed at the end of the list you may never stop, unless you build in an extra check for that. A simple handle check might be enough, but needs testing.

 

Check_Solids.vsm.zip

 

Have fun,

Gerard

Link to comment
  • 0

Hi Gerard,

 

Okay, I've replaced the command with your updated Check Solids .vsm, and threw together a little "test drive" file for it (attached).  At the left are two profiles.  Then there's a "Molding" symbol, which is just a 1" extrusion of Profile A (for easy scaling in inches).  Then there's the "Miter" symbol, which is a pair of Solid Subtractions made from asymmetrically scaled instances of the "Molding" symbol.  Then there's the "Lintel" symbol, which consists of two of the "Miter" symbols, another asymmetrically scaled instance of the "Molding" symbol, and also an extrude.  And then the "Opening" symbol is made from the "Lintel" symbol, plus another solid made from three "Molding" symbols, and so on.  Lastly, many of these are duplicated onto a couple of other layers.  So, I've built up a lot of stuff based on a single symbol.  And sometimes clients (rarely designers, of course...) might want to change the typical molding profile... ... ...which can be very tedious when it's necessary to find and double-click on all of the affected symbols and solids that use that typical profile.

 

But if in this file I edit the "Molding" symbol and replace the extrude's profile with Profile B, and then run your "Check Solids" command, it works beautifully!  Absolutely everything, on every layer, is updated as expected!  So thank you for this!

 

(For whatever reason, the "picture frame" solids have no fill.  Yet, oddly enough, when symbols containing them are mirrored back-to-back and added together as solids, they're fine.  Changing the profile doesn't seem to make any difference.  Often it's impossible to tackle one issue in Vectorworks without running into another one...*sigh*).

 

"It was a problem that I ran into a lot when changing form VW version 2009 to 2010 (I think it was)" - I remember that: the transition to Parasolids, or some such thing, right?

 

"If you edit your symbols through the Resource manager it will update all solids using that symbol." - - - hmm... I did not find that to be the case.  If I change the "Molding" symbol's profile in the Resource Manager, nothing's updated...  Or maybe I'm missing something...

 

"I noticed I'm using a top down search in this script...." - - - you pretty much lost me with the rest of that paragraph...  At least in my little test file, your script seems to work perfectly...

 

Again, thank you!

 

 

04-Ceck Solids Test Drive-00.vwx

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
Answer this question...

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