Jump to content

maarten.

Member
  • Posts

    387
  • Joined

  • Last visited

Everything posted by maarten.

  1. Yes, that is a posibility. But you can also check before writing the info into the arrays if the name already is saved in the array. PROCEDURE SetInfo(h : HANDLE); VAR cnt : INTEGER; bool : BOOLEAN; BEGIN total:=total+1; ALLOCATE winH[1..total]; ALLOCATE winL[1..total]; ALLOCATE winN[1..total]; FOR cnt:=1 TO total DO IF GetSymName(h)=WinN[cnt] THEN bool:=TRUE; IF NOT bool THEN BEGIN winH[total]:=h; GetBBox(h,pt1.x,pt1.y,pt2.x,pt2.y); WinL[total]:=pt2.x-pt1.x; WinN[total]:=GetSymName(h); END; END;
  2. Here you go : {Maarten Vandickelen 2008} PROCEDURE WindowsToLayer; VAR winH : DYNARRAY of HANDLE; WinL : DYNARRAY of REAL; WinN : DYNARRAY of STRING; total : INTEGER; count : INTEGER; tmpS : STRING; tmpCount : INTEGER; cnt1,cnt2 : INTEGER; tmpR : REAL; tmpH : HANDLE; pt1,pt2 : POINT; ptN1,ptN2 : POINT; PROCEDURE SetInfo(h : HANDLE); BEGIN total:=total+1; ALLOCATE winH[1..total]; ALLOCATE winL[1..total]; ALLOCATE winN[1..total]; winH[total]:=h; GetBBox(h,pt1.x,pt1.y,pt2.x,pt2.y); WinL[total]:=pt2.x-pt1.x; WinN[total]:=GetSymName(h); END; BEGIN ForEachObject(SetInfo,S='*window*'); IF total<>0 THEN BEGIN {create new layer} tmpS:='New Layer'; IF GetObject(tmpS)<>NIL THEN BEGIN REPEAT tmpCount:=tmpCount+1; IF GetObject(ConCat(tmpS,Num2Str(0,tmpCount)))=NIL THEN tmpS:=ConCat(tmpS,Num2Str(0,tmpCount)); UNTIL(GetObject(tmpS)=NIL); END; Layer(tmpS); {sort symbols by length} FOR cnt1:=1 TO total DO BEGIN FOR cnt2:=1 TO total-cnt1 DO BEGIN IF WinL[cnt2]>WinL[cnt2+1] THEN BEGIN tmpH:=WinH[cnt2]; tmpR:=WinL[cnt2]; tmpS:=WinN[cnt2]; WinH[cnt2]:=WinH[cnt2+1]; WinL[cnt2]:=WinL[cnt2+1]; WinN[cnt2]:=WinN[cnt2+1]; WinH[cnt2+1]:=tmpH; WinL[cnt2+1]:=tmpR; WinN[cnt2+1]:=tmpS; END; END; END; {place symbol} FOR count:=1 TO total DO BEGIN IF count=1 THEN Symbol(winN[count],0,0,0) ELSE BEGIN GetBBox(LNewObj,pt1.x,pt1.y,pt2.x,pt2.y); Symbol(WinN[count],0,0,0); GetBBox(LNewObj,ptN1.x,ptN1.y,ptN2.x,ptN2.y); {move this symbol 50cm over the last symbol} HMove(LNewObj,pt2.x-ptN1.x+50cm,0); END; END; END; END; RUN(WindowsToLayer);
  3. With used/unused, do you mean if there are objects in that class? If so, i think you can not do this standard in VW and have to go to VectorScript. You can make a list of your used classes and write them to a textfile or to a worksheet. Edit: if you're interested in that, you can start a new topic in the VS section of this board, or you can do a search cause i'm pretty sure it has been made before.
  4. Paul, i have such a script that does somehow what you need. I only had to use it ones, so it isn't tested alot yet. I just need to adjust some lines and translate my Variables into English, so you will understand it. If you want, i can post it, just say so. (funny thing is, it's almost written as Pat says here above )
  5. Well, not completely, here's a list of the pio's that are of no use here in Belgium. We have to pay for those and just can't use them because we don't build this way or because they are in a US standard measure that isn't available over here. Campanile Comm Device Door Flowchart (Node, Link) Incandesent Fixture Pipe Fitting Receptacle Slot Stairs Story Pole Toilet Stall Window And then there are also quite a lot of things that are so rarely used over here, that it isn't worth the price. So i think it would be better to give the local distributors a full version but without all the American pio's. The distributor can then still decide to buy some US pio's that could be used by the local customers. BTW, there are also some users here in Belgium that can't use any of the pio's (the US or BeNeLux one) and want a standard version, but the Fundamental version is so stripped down that they can't use it either, so they would also be happy with a full version without any pio.
  6. I have to agree with DWorks here (happy birthday btw ). We get quite a lot of pio's in our version that we can't use at all... Not just because they aren't translated, but just because we don't build in the same way as they do in the US.
  7. It's a VectorScript error saying that the script is writing data into an array that isn't "wide" enough. The array needs to be Allocated so all the data will fit into the array. So, it's a bug. Send the file and a little description to NNA's Bug-submit and they can have a look at it.
  8. It would be a shame if they would stop doing updates for software that came out only a year ago... Office2004 for mac was still updating last year (don't know if it's still going on), so that's at least 3 years after the release date (and VW is almost double as expensive as Office is).
  9. If NNA would start with a large group of Beta-testers before releasing the program, there would be a lot less ridiculous bugs. I was in shock when i saw the bugs that accured in SP1 of VW2008... Crazy angles while drawing walls (this made drawing walls a hell for a few months!), drawing a rotated rectangle with the coordinates bar didn't fix the angle of the rectange (i couldn't use the rotated rectangle), scaling rectangles by the coordinates bar, buggy arrowheads,... I found all these things in the first week of using VW2008... Why didn't NNA found these? Seriously, if i will buy VW2009, it would sure be untill SP3 or later, no way that i will waste again so much time because NNA released software that wasn't finnished.
  10. Agree with that! It has been a wish of me for some time now, i even wanted to go further then that: Transparency in Hatches. That way you can set every line's transparancy different. Also the background's transperency should be editable Transperency in Gradients. I would like to be able to give every color it's own transparency.
  11. Have you already restarted VectorWorks? The list of Plug-ins only refresh when you restart VW.
  12. It seems like the "Activate Layer" command isn't standaard in the Dutch workspace so therefor i had no idea of its excistence... Thanks for the info Frank, i learn something new every day .
  13. There's a big "Mute" button on the right top of your keyboard, it's not that hard to use it
  14. This should do the trick. There are other ways of doing it, but as Frank said, getting the layer of the selected object is not that easy. PROCEDURE ActivateLayerAndClass; VAR pt : POINT; h : HANDLE; BEGIN GetPt(pt.x,pt.y); h:=PickObject(pt.x,pt.y); IF h<>NIL THEN BEGIN NameClass(GetClass(h)); Layer (GetLName (GetLayer(h))); END; END; RUN(ActivateLayerAndClass); It lets you pick an object and then will set the class and layer of that object active.
  15. I'm pretty sure it's not possible with VectorScript cause VW doesn't save the used commands in a log, so there's no way that a script can go and find that information cause it doesn't excist. There probable is a way to make such a log with a script, but i'm sure it will be buggy like hell and it will only slow down your VW... To be honest, i've never really missed such a thing as "last command" cause i have a short key for all the commands i use frequently. When there's a command without one that i'll have to use multiple times a day, i just make a temporary short key for it.
  16. I think this can not be changed bij VS cause it's the Operation System who has control over this. On mac, you'll always get the last location. Not sure how it is on windows. If you use mac, you can drag the folder into the left side of your "open file" dialog so you'll have a shortcut (alias) to that folder and you don't have to browse to the right location everytime.
  17. Ah, oke, i see your point. I can second that, some bugs occur on mac while they don't on a PC and visa versa.
  18. If you double click on them in the finder, you'll open them BUT they'll get the "untitled.vwx" name. If you do File=>new, you'll get a little dialog where you can choose between these templates. I hope it's this what you want to know, otherwise i have no idea what you're asking :crazy:
  19. .sta are your templates. To make one: File=>Save as Template. To find them in your finder: Aplication support/VW/2008/Templates.
  20. Hmm, can you name some. I can't really think of something that works better on pc then on mac, or visa versa.
  21. I wanted to make a script not that long ago that did this. But DoMenuTextByName('Paste In Place',0); doesn't works with objects that come from an other drawing.To bad... Otherwise it wouldn't be that hard to make that script. So you get my vote too to get this standard in VW!
  22. They haven't mentioned if it will be faster then VW2008... So maybe they mean faster then AC, or faster then Minicad 6 or... One thing that i did learned over the years is to not get excited by the words of salesmen/marketing compaigns (they are the Devil in disguise :grin: )... I only believe what i see.
  23. Ah, that does make sense. Thanks for the answer!
  24. Thanks for the info Pat! Still, i don't see the purpose of squarename, cause it's not the one that the user has chosen in the Units dialog... But it's probable just me. Thanks again for the info Pat, it's much apreciated!
  25. And it could also go hand-in-hand with this one http://techboard.nemetschek.net/ubbthreads/ubbthreads.php?ubb=showflat&Number=100492#Post100492
×
×
  • Create New...