Jump to content

maarten.

Member
  • Posts

    387
  • Joined

  • Last visited

Everything posted by maarten.

  1. Can we make some more suggestions? Dialogs: as mentioned above, i think it would be nice to have a dialog editor. I personally never worked with such an editor before but if it would work something like this, i would like it a lot : A dynamic preview of the dialog where you can drag/drop controllers in. Clicking on such a controller let you type in the values you need (strings), or some code if you want to fill it with dynamic values (a list of all classes or something like that) The ID's of the controllers should be visible, maybe transparent or something (this option can be turned of in the preferences). You should be able to give your own control ID's, but it should give a warning if the ID is already used. Right clicking on a controller gives you a little submenu where you can choose "Ad action". Here you can fill in some code or you can use a predefined editor where you can choose things like IF 'some control' is 'some value' THEN 'this control' is 'unvisible' (it could look like the Criteria dialog) to do some Dialog_Setup like Swappanes or dynamic content of the controlers. [*]Dialogs used inside the VS "package" (sorry, don't know the English word), like the Parameter Dialog, the VS Editor, VS Preferences Dialog, Dialog Editor (if they would be made of course ),... should all be able to be placed next to each other and used at the same time. A dialog should not make an other dialog unusable. (I just mean that al those dialogs should work as the VW pallets, you don't need to close them when you want to turn back to your drawing or an other pallet). [*]The Parameter Dialog: Get rid of the Edit, Add and Remove buttons. A parameter should be editable directly in this dialog, like you adjust a spreadsheet (cause it's a real pain in the *ss when you need to adjust a whole list of Parameters): Click on the "cell" to directly edit the text: Click on a pulldown to choose an other type or Standard value: Click on "Edit" to edit the content of such a parameter, you'll get a little dialog to fill in the values: [*]Compiling: more information by Warnings. When you get a warning such as "String can not exceed 255 chars", at least say in what line this happened and it would be even nicer to see what value caused this error. Same thing with a NIL handle, give the line where this happened. When an index is outside an array. Give the value that caused the error. When there's an error in a line, such as "Identifier not declared", highlight the Identifier that is not declared.
  2. the editor: A simple find-replace is really the minimum. In some texteditors you can select one word and it will be highlighted in the rest of the text. That way you can see real quickly where in the script (for example) a variable is used. You should be able to turn this option off in the preferences. auto sugestions while typing. When you type 3 letters, you should get an suggestion of procedures and functions that start with those 3 letters. You should be able to turn this option off in the preferences. List of variables: when you press (for example) alt+spacebar, you get a list of all the variables used in that Function/Procedure. When you're in a subProcedure/subFunction, you'll also see the vars of the Procedure/Function where the active Function/Procedure is placed in. You should be able to turn this option off in the preferences. Same as the last one, but then with the Paramters used in the Pio. You should be able to turn this option off in the preferences. [*]the debugger: It shouldn't crash VW on large scripts (Windows). It shouldn't crash VW on dialogs (Windows & Mac). It shouldn't be called with {$debug} but with a button in the editor (like the compile button).
  3. Ow, yes please!!! The last couple of weeks, i bumped a lot on the boundaries of VS so an other language with more options but less hard to learn then C++ sounds very good to me . But again like the rest already mentioned, don't replace or remove VS.
  4. Try to clean out your script first. Remove all things that aren't necessary before you post it, it will take us less time to see what you're doing, cause now i have no idea what your script does (sorry, don't have the time to dig in it for a long time). Also, it will be less hard for yourself to locate the error. I guess that you somewhere convert your DynArray of Char to a String and therefor loose the everything after 255 chars. BTW, why don't you use a parameter to store the info in? That way you don't need to create an external record. Here's an example that works (272 chr). It's a point pio with one invisible Parameter "__Par". Oke, it's a quite ridiculous example but it just shows that it does work to store more then 255 chars in a record. PROCEDURE Voorbeeld; VAR bool : BOOLEAN; PioName : STRING; PioHand : HANDLE; PioRecord : HANDLE; PioWall : HANDLE; Long : DYNARRAY of CHAR; BEGIN IF GetCustomObjectInfo(PioName,PioHand,PioRecord,PioWall) THEN BEGIN Long:=ConCat('00xxxxxxx10xxxxxxxx20xxxxxxxx30xxxxxxxx40xxxxxxxx50xxxxxxxx60xxxxxxxx70xxxxxxxx80xxxxxxxx90xxxxxxxx','100xxxxxxx110xxxxxxx120xxxxxxx130xxxxxxx140xxxxxxx150xxxxxxx160xxxxxxx170xxxxxxx180xxxxxxx190xxxxxxx200xxxxxxx210xxxxxxx220xxxxxxx230xxxxxxx240xxxxxxx250xxxxxxx260xxxxxxx270'); Message(Len(Long)); SetRField(PioHand,PioName,'__Par',Long); CreateText(GetRField(PioHand,PioName,'__Par')); END; END; RUN(Voorbeeld);
  5. Result:=SetVPClassVisibility(hVP,ClassList(iTemp),1); should be Result:=SetVPClassVisibility(hVP,ClassList(iTemp),0);
  6. First question: ReDraw or RedrawAll? Other questions: have a look at SetObjectVariableReal/Boolean/Longint/Int, in the Appendix you'll find that 500-550 is about Textures. From the online FR: PartID: partID is texture part, overall is 3 Value: Value is one of the: kPlaneSpace = 0; kSphereSpace = 1; kCylinderSpace = 2; kAlgorithmicSpace = 3; {Space that wraps around the object most} Algorithmic means either the "perimeter" or "roof" mapping type.
  7. You can change the keys in the OS configuration. Go to your System Preferences and take the option "keyboard and mouse" and at the bottom click the button "Special keys" and there you can switch the ctrl and cmd key. I changed those two too because i find this handier for short keying. Beware that you need the option (alt) button on mac to copy something and not the ctrl key like on a windows machine...
  8. Good to hear cause that was one of painful side-effects of that method. I'll keep your method in mind next time i need to draw one!
  9. You could try it with this script... Not tested so use it on your own risk (try it first on a copy of the drawing). It will delete the 2D objects on the active layer. PROCEDURE Delete2D; FUNCTION Check2D(h : HANDLE) : BOOLEAN; BEGIN IF GetObjectVariableBoolean(h,651) THEN DelObject(h); END; BEGIN ForEachObjectInList(Check2D,0,1,FInLayer(ActLayer)); END; RUN(Delete2D); EDIT: nevermind, better use the above method, i think that's safer .
  10. See attached file. (i've managed to get the insulation correct but now the (outside) masonry doesn't connect propperly) Dieter's workaround is almost the same as mine but looks less complicated then mine... (and he did it in way less steps then my method ) And indeed, by moving the wall to the back and to the front and connecting a lot of components, you'll get this result. Same here in VW12, but in VW2008 it seemed that it worked much better and the chances things went wrong afterwards became smaller, so we didn't need to use patches anymore that often. (but sometimes it was just faster to draw a patch then to make such a connection).
  11. The only problem is the insulation, the rest is doable (did it in VW2008 so i guess it's also possible in VW2011). But indeed, it's a real pain in the ass to make these kind of connections because you need to move the walls to the for- and the others to the background. So when you have a wall with on it's beginning and end such a connection, you're unable to do so... And yes, here in Belgium this is also a quite normal wall connection.
  12. Indeed, everything on one site... It's not logical that there are so many Function References with all different information. I believe that if there would be some little but well documented tutorials about how to start with VS, people could learn it theirselfs.
  13. On the Belgium board we had some problems with this too. A user made a document script and after he reopened it, everything after line 1039 was gone. When he made it a plug in, there was no problem.
  14. Is a plug in limited too? I thought that only document scripts were...
  15. GetSymLoc3D(PioHandle,x,y,z) gives you the insertion location of the Pio in the drawing.
  16. PROCEDURE Voorbeeld; VAR pathHd,PioPathHd,PioHd,PiorecHd,PiowHd : HANDLE; PioName : STRING; BEGIN IF GetCustomObjectInfo(PioName,PioHd,PiorecHd,PiowHd) THEN BEGIN {get the handle to the path} PioPathHd:=GetCustomObjectPath(PioHd); {to make it visible, duplicate it} PathHd:=CreateDuplicateObject(PioPathHd,NIL); {now that you have the handle to the drawn poly, give it an other color (for example)} SetPenFore(PathHd,65535,0,0); END; END; RUN(Voorbeeld);
  17. There's an example on the Belgium forum of a script that does just what you need. Search for the topic "bestandsnaam op plannen" and in post 100 you'll find the finished script.
  18. With GetPolyPt3D. Do a search on this board for more info.
  19. You need to make a tool by path. in your menu commando you draw a poly and call that tool with CreateCustomObjectPath. see here to see this work: http://techboard.nemetschek.net/ubbthreads.php?ubb=showflat&Number=143822#Post143822
  20. Yes, but you still need to confirm the dialog for every image, kind of irritating but it's getting better with every version .
  21. You need to switch your workspace to something else than "Fundamentals".
  22. Have you stripped down the script already to find the error? Could you post the script (or a stripped down version), cause now it's just guessing what's wrong.
  23. If you want to use symbols: To place them could this be a way: The name of the symbol in this example is Chair. There's a record with the name RName and a field FName in the drawing. A text object in the symbol is linked to that record field. PROCEDURE Voorbeeld; {This is a menu commando or a document script} {This is just a sketch, not fully tested} VAR crit : STRING; aant,tel : INTEGER; x,y : REAL; b : BOOLEAN; BEGIN {count the number of already placed chairs on this layer} crit:=ConCat(Chr(40),Chr(40),'S=',Chr(39),'Chair',Chr(39),Chr(41),Chr(38),Chr(40),'L=',Chr(39),GetLName(ActLayer),Chr(39),Chr(41),Chr(41)); aant:=Count(crit); {start a loop until the user selects a tool or presses esc} REPEAT {let the user click and place there the symbol} GetPt(x,y); Symbol('Chair',x,y,0); {set the number} tel:=tel+1; SetRField(LNewObj,'RName','FName',Num2StrF(aant+tel)); {redraw the screen to show the symbol} Redraw; UNTIL(b); END; RUN(Voorbeeld); A script can not be run when you delete an object, so you still have to run it manually every time you delete a chair. How do you want them to be renumbered? The first placed will always have nr1, the second nr2,... and the last placed nrX? If so, it isn't that hard because you can use the order that VS uses. When VS does a search through the objects, it starts with the first created and ends with the last created. PROCEDURE ReNumber; {This is a menu commando or a document script} {This is just a sketch, not fully tested} VAR crit : STRING; tel : INTEGER; PROCEDURE SetNumber(h : HANDLE); BEGIN tel:=tel+1; SetRField(h,'RName','FName',Num2StrF(tel)); END; BEGIN crit:=ConCat(Chr(40),Chr(40),'S=',Chr(39),'Chair',Chr(39),Chr(41),Chr(38),Chr(40),'L=',Chr(39),GetLName(ActLayer),Chr(39),Chr(41),Chr(41)); ForEachObject(SetNumber,crit); Redraw; END; RUN(ReNumber); If you want an other way to renumber them, you'll have to figure out how you want to do them so we can see if it's possible in VS.
  24. I attached an image to show how it works here. If you really think it's a bug, you can always Submit a Bug (right top of this board), maybe NNA will fix it then. (btw, there's a new SP out for us, go to the Belgium site to download it, maybe that would also solve the problem?)
×
×
  • Create New...