Jump to content

calsan

Member
  • Content Count

    43
  • Joined

  • Last visited

Everything posted by calsan

  1. OK, thanks guys. At least there is an underlying logic to why it doesn't work!
  2. I wonder if there is an alternative routine to find by layer name? I tried this and it doesn't work either... PROCEDURE PickLayer250; PROCEDURE SelectThem(h :HANDLE); BEGIN SetSelect(h); END; BEGIN ForEachObject(SelectThem, L='*250*'); END; RUN (PickLayer250);
  3. I'm trying to find objects in layers whose name contains (for example) "250" Why does this work for classes: SelectObj(C='*250*'); but wildcard search doesn't work for layers: SelectObj(L='*250*'); :confused:
  4. Instructions to install the above script into a menu in your workspace: Create the plugin: Select menu item: Tools / Plug-ins / Plug-in Manager... Custom Plug-ins Tab - click "New..." Name the script "Grey Patterns to Grey Fills" Select the option "Command" Click "OK" Click "Edit Script..." Paste the script text copied from the above field Click "OK" Click "Close" Edit your workspace: Find the command "Grey Patterns to Grey Fills" under miscellaneous Drag it under the menu "New" (or your preferred menu location. This will now be available at all times under the New menu
  5. Procedure PatternsSwapToFill; PROCEDURE fillObj1(h:HANDLE); BEGIN SetFPat(h, 1); SetFillBack(h,21760,21760,21760); {Fill 1 - Type the desired fill colour # here} END; PROCEDURE fillObj2(h:HANDLE); BEGIN SetFPat(h, 1); SetFillBack(h, 34816,34816,34816); {Fill 2 - Type the desired fill colour # here} END; PROCEDURE fillObj3(h:HANDLE); BEGIN SetFPat(h, 1); SetFillBack(h, 43520,43520,43520); {Fill 3 - Type the desired fill colour # here} END; PROCEDURE fillObj4(h:HANDLE); BEGIN SetFPat(h, 1); SetFillBack(h, 49152,49152,49152); {Fill 4 - Type the desired fill colour # here} END; PROCEDURE fillObj5(h:HANDLE); BEGIN SetFPat(h, 1); SetFillBack(h, 56576,56576,56576); {Fill 5 - Type the desired fill colour # here} END; PROCEDURE fillObj6(h:HANDLE); BEGIN SetFPat(h, 1); SetFillBack(h, 60928,60928,60928); {Fill 6 - Type the desired fill colour # here} END; BEGIN ForEachObject(fillObj1,(INSYMBOL & INGROUP & INOBJECT & INVIEWPORT & (FP=3))); {Type the original pattern 1 # here} ForEachObject(fillObj2,(INSYMBOL & INGROUP & INOBJECT & INVIEWPORT & (FP=4))); {Type the original pattern 2 # here} ForEachObject(fillObj3,(INSYMBOL & INGROUP & INOBJECT & INVIEWPORT & (FP=5))); {Type the original pattern 3 # here} ForEachObject(fillObj4,(INSYMBOL & INGROUP & INOBJECT & INVIEWPORT & (FP=6))); {Type the original pattern 4 # here} ForEachObject(fillObj5,(INSYMBOL & INGROUP & INOBJECT & INVIEWPORT & (FP=7))); {Type the original pattern 5 # here} ForEachObject(fillObj6,(INSYMBOL & INGROUP & INOBJECT & INVIEWPORT & (FP=8))); {Type the original pattern 6 # here} END; RUN(PatternsSwapToFill);
  6. I found out the fill numbers are unreliable, as they have changed between vectorworks versions. More reliable than fill numbers is to use 24bit RGB values. Get the RGB Value by hovering over the fill in the attirbutes palette. Multiply each RGB value by 256 i.e. Grey of RGB value (221, 221, 221) becomes (56576, 56576, 56576) Below is amended 24bit RGB script.
  7. Procedure PatternsSwapToFill; PROCEDURE fillObj1(h:HANDLE); BEGIN SetFPat(h, 1); SetFillBack(h, 1236); {Fill 1 - Type the desired fill colour # here} END; PROCEDURE fillObj2(h:HANDLE); BEGIN SetFPat(h, 1); SetFillBack(h, 1237); {Fill 2 - Type the desired fill colour # here} END; PROCEDURE fillObj3(h:HANDLE); BEGIN SetFPat(h, 1); SetFillBack(h, 1238); {Fill 3 - Type the desired fill colour # here} END; PROCEDURE fillObj4(h:HANDLE); BEGIN SetFPat(h, 1); SetFillBack(h, 1239); {Fill 4 - Type the desired fill colour # here} END; PROCEDURE fillObj5(h:HANDLE); BEGIN SetFPat(h, 1); SetFillBack(h, 1240); {Fill 5 - Type the desired fill colour # here} END; PROCEDURE fillObj6(h:HANDLE); BEGIN SetFPat(h, 1); SetFillBack(h, 1241); {Fill 6 - Type the desired fill colour # here} END; BEGIN ForEachObject(fillObj1,(INSYMBOL & INGROUP & INOBJECT & INVIEWPORT & (FP=3))); {Type the original pattern 1 # here} ForEachObject(fillObj2,(INSYMBOL & INGROUP & INOBJECT & INVIEWPORT & (FP=4))); {Type the original pattern 2 # here} ForEachObject(fillObj3,(INSYMBOL & INGROUP & INOBJECT & INVIEWPORT & (FP=5))); {Type the original pattern 3 # here} ForEachObject(fillObj4,(INSYMBOL & INGROUP & INOBJECT & INVIEWPORT & (FP=6))); {Type the original pattern 4 # here} ForEachObject(fillObj5,(INSYMBOL & INGROUP & INOBJECT & INVIEWPORT & (FP=7))); {Type the original pattern 5 # here} ForEachObject(fillObj6,(INSYMBOL & INGROUP & INOBJECT & INVIEWPORT & (FP=8))); {Type the original pattern 6 # here} END; RUN(PatternsSwapToFill);
  8. Have modified the script to replace on multiple patterns to fills. Posting as may be of use to someone.
  9. Procedure filler; PROCEDURE fillObj(h:HANDLE); BEGIN SetFPat(h, 1); SetFillBack(h, 1236); END; BEGIN ForEachObject(fillObj,(INSYMBOL & INGROUP & INOBJECT & INVIEWPORT & (FP=3))); END; RUN(filler); This works!!!!!!!! Happy Happy Joy Joy Many thanks to Dieter @ DWorks and twk. I hope the above code will be of use to someone reading this in the future.
  10. And this is the error: Line #8: ForEachObject(fillObj,(INSYMBOL & INOBJECT & INVIEWPORT & (FP=3))); | { Error: Expected a procedure that accepts one handle argument. } Line #10: RUN(filler); | { Error: Expected a RUN statement at the end of the script }
  11. This is the script now. Procedure filler; Function fillObj(h:HANDLE):BOOLEAN; BEGIN SetFPat(h, 1); SetFillBack(h, 1236); END; BEGIN ForEachObject(fillObj,(INSYMBOL & INOBJECT & INVIEWPORT & (FP=3))); END; RUN(filler);
  12. On a tangent... This forum needs a 'like post' option... Would be nice to give a like to someone who's trying to help you out of a hole.
  13. This is with the '' removed Line #1: FUNCTION filler(): | { Error: Expected beginning of a statement. } | { Error: Identifier not declared. } Line #3: FUNCTION fillObj(h: HANDLE): BOOLEAN; | { Error: Identifier not declared. } | { Error: Identifier not declared. } Line #6: SetFPat(h, 1); | { Error: Identifier not declared. } | { Error: Expected a string. } | { Error: Expected a handle. } | { Error: Expected , } | { Error: Expected a string. } | { Error: Expected ) } | { Error: Did not expect this after end of statement - missing ;? } Line #7: SetFillBack(h, 1236); | { Error: Expected END } | { Error: Identifier not declared. } | { Error: Expected a string. } | { Error: Expected a handle. } | { Error: Expected , } | { Error: Expected a string. } | { Warning: Expected a longint or integer expression. } | { Error: Expected , } | { Error: Expected a string. } | { Warning: Expected a longint or integer expression. } | { Error: Expected , } | { Error: Expected a string. } | { Warning: Expected a longint or integer expression. } | { Error: Expected ) } | { Error: Did not expect this after end of statement - missing ;? }
  14. This is the error output with '' in place: Line #1: FUNCTION filler(): | { Error: Expected beginning of a statement. } | { Error: Identifier not declared. } Line #3: FUNCTION fillObj(h: HANDLE): BOOLEAN; | { Error: Identifier not declared. } | { Error: Identifier not declared. } Line #6: SetFPat(h, 1); | { Error: Identifier not declared. } | { Error: Expected a string. } | { Error: Expected a handle. } | { Error: Expected , } | { Error: Expected a string. } | { Error: Expected ) } | { Error: Did not expect this after end of statement - missing ;? } Line #7: SetFillBack(h, 1236); | { Error: Expected END } | { Error: Identifier not declared. } | { Error: Expected a string. } | { Error: Expected a handle. } | { Error: Expected , } | { Error: Expected a string. } | { Warning: Expected a longint or integer expression. } | { Error: Expected , } | { Error: Expected a string. } | { Warning: Expected a longint or integer expression. } | { Error: Expected , } | { Error: Expected a string. } | { Warning: Expected a longint or integer expression. } | { Error: Expected ) } | { Error: Did not expect this after end of statement - missing ;? }
  15. Hi Thanks for the help - but I can't get this line to compile: BEGIN ForEachObject(fillObj,'(INSYMBOL & INOBJECT & INVIEWPORT & (FP=3))'); END; I tried with and without the '' but it just pops up a script error. I'm sorry, I also don't know how to reset objects!
  16. This works, but doesn't update items in groups... Procedure Filler; FUNCTION fillObj(h:HANDLE) :BOOLEAN; Begin SetFPat(h,1); SetFillBack(h,1236); End; BEGIN DSelectAll; SelectObj(INSYMBOL & INOBJECT & INVIEWPORT & (FP=3)); ForEachObjectInLayer(FillObj,2,2,1); END; RUN(Filler);
  17. Well, still struggling. I have found out this much: This script pops up the object attributes for any object with fill pattern 3 and allows manual selection of the fill attribute. EditProperties(INGROUP & INVIEWPORT & (FP=3)); This script sets the fill background colour of any selected object to colour 1236: Procedure Filler; FUNCTION fillObj(h:HANDLE) :BOOLEAN; Begin SetFPat(h,1); SetFillBack(h,1236); End; BEGIN ForEachObjectInLayer(FillObj,2,0,4); END; RUN(Filler); No idea how to link the two. Actually, I haven't found much in the way of reference material. Vectorlab.info doesn't exist anymore and the script reference just provides a list of functions....
  18. Help needed please! :confused: I would like a script to replace all object fill patterns in a 2d drawing with a fill colour using vectorscript. Can anyone help with this? For example, replace all instances of fill pattern #4 with fill colour #1826. Thanks for any help.
  19. Fed up with the continuous crashing, unmoveable objects and screen / layer plane issues in Vectorworks 2011. I've downgraded to 2010. What a relief!!! I can finally get some work done. I've been drawing for 5 minutes as of now... no crashes!!! Vectorworks / Minicad user since Minicad+ This was worst release ever.
  20. I agree with jtml. I find that survey drawings I import from autocad become a total mess. This is because they are both 2D and 3D. importing as 2d only doesn't fix the problem. my workaround solution is to export the file as vectorworks 2008 format, which strips the layer / screen plane settings. Opening the 2008 format file back into 2011 finds the file behaving as desired.
  21. Thanks for the link. I notice the posting date for the software is one day after I asked my question!
  22. I never liked the callout boxes... As a work-around until this is (hopefully) solved, maybe add the leader line tool back into the workspace. It's under "Legacy". This way you can just type the text and then draw a normal leader line. Normal text has a few advantages, like being able to use superscript: avoiding notes like: m2 (meters squared, not meters two).
  23. I have searched the site and can't find the download for vectorworks viewer 2011. It's also not on our installer DVD. Viewer 2010 won't open our new v2011 files. Is there, or will there be, a viewer available or has it been discontinued?
  24. I've got the current model mac mini server - the one with the built in power supply that looks like the Apple TV unit. We bought it because it was much better value than the sever software alone. We only needed the server software because apple cripple the standard OS to prevent more than 10 users being able to connect to the one computer. We would have just got a NAS box, but my previous experience with the READYNAS was that it was too slow for users with large files. If you have less than 10 connections to the computer, then plain vanilla OSX is just as good. It's an unfortunate problem with the mac line up that the macs without built in monitors are pretty expensive for what you get and the other hardware isn't designed for any disk redundancy or ability to be upgraded. I also found that most of the services offered on OSX server can actually be achieved better just by getting a decent Router with VPN. However, it's all we need at the moment, looks very nice and is totally quiet.
  25. We have one running in an office of 10 users. It's a pretty basic setup: It runs retrospect to backup files (over the network) to an external USB disk. It shares a folder containing our admin files and archived projects. My observation is this: OSX Server is not as easy to setup as a regular copy of OSX. The mac mini itself is very limited in hard disk space, which wouldn't be a problem if it had e-sata, but it doesn't, so it is. Basically, I tried sharing a firewire connected disk - but it was geologically slow: 5GB transfer to the server would take over an hour. I switched to USB, but same problem. Now I only use the internal disks. If you can get by with less than 1TB total disk space - split over two disks, then it's fine. Turning on services other than file sharing slows things down quite noticeably.

 

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