Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by CodeGier

  1. DoMenuTextByName('Export Image File',0); But you have to manually type the filename for every item in the Loop... Not the best solution.
  2. Found a solution in the VectorScript mailing list. Thanks to Bill Wood: function checkstatus : BOOLEAN; Var objty : INTEGER; btest : BOOLEAN; begin locus(0,0); objty := gettype(getparent(Lnewobj)); delobject(Lnewobj); btest := (objty = 31); {Layer} if NOT btest then alrtdialog('Exit current editing mode first'); checkstatus := btest; end;
  3. "convert to lines" does not work in PIOs. I recommend to use an Auto-hybrid. In the attached Record do: Set Field(tempHandle,'Auto Hybrid','display','2D'); So the Auto-Hybrid is only shown in 2D-view. This did the trick in my case. Bye CodeGier
  4. Got reply of my distributor: They are sending me a DVD with the international DEMO-Version. I am impressed of this quick service!
  5. Hello, I am having the following issue (VW 2014 SP4): When editing the path of an extrude-along-path object, the lines of the whole drawing are shown greyed (see attached screenshot). When editing the path of my 3D-Path-PIO only the path is shown. It's hard using the PIO because you don't see the rest of the drawing when editing the path. I tested with this small sample code, and theres the issue too. Tried different projections (2D or 3D, Requires 2D, Requires 3D) but it didn't help. What am I missing? PROCEDURE Test3DPath; VAR objName : STRING; pathHd, objHd, objrecHd, wHd : HANDLE; Procedure DrawTheTest(aPath : Handle); VAR i : integer; aV : Vector; Begin for i := 1 to GetVertNum(aPath) do begin GetPolyPt3D(aPath, i-1, aV.x, aV.y, aV.z); Locus3D(aV.x, aV.y, aV.z); end; End; Procedure DrawTest3DPath; VAR result : BOOLEAN; BEGIN result:= GetCustomObjectInfo(objName,objHd,objrecHd,wHd); IF result THEN BEGIN pathHd:= GetCustomObjectPath(objHd); IF pathHd <> NIL THEN BEGIN DrawTheTest(pathHd); END ELSE AlrtDialog('Error'); END; End; BEGIN SetPref(407,TRUE); DrawTest3DPath; END; Run(Test3DPath);
  6. OK, I am asking my distributor. Thanks for replying. I fear he will say: "ask Nemetschek NA" ;-) Bye CodeGier
  7. I am using VW 2014 german version. For scripting it would be much easier to have an english version. The translations of menu-commands etc. are not alway enlighting. Is a demo version available (without time restriction, no saving, no printing) where I can have a peek at the english commands? I only found a download for a 30 days Trial. With my installation DVD I can install a German Demo, but english? CodeGier
  8. hello, my path-PIO throws errors when double-clicking it and editing the path. The error is thrown in the part of the code where the profile of the PIO is set: PROCEDURE SetProfile(aObjHand : HANDLE); VAR Ergebnis : Boolean; aHand : HANDLE; BEGIN Symbol(mySymbolName,0,0,0); aHand := LNewObj; Ergebnis := SetCustomObjectProfileGroup(aObjHand, aHand); IF not Ergebnis THEN AlrtDialog('Not able to set profile!'); END; Is it possible to check if in edit mode to avoid setting the profile in this case? CodeGier
  9. OK, answering it myself. Should have done "Export Text" to have a look at it. Silly me ;-) : procedure CreateAutoHybrid(aHandle: Handle); var tempHandle : Handle; boolResult : Boolean; begin tempHandle := CreateCustomObject('Auto Hybrid',0.000000000000000,0.000000000000000,#0.0000000000000d); boolResult := SetCustomObjectProfileGroup(tempHandle, aHandle); if boolResult then begin Record(tempHandle,'Auto Hybrid'); Field(tempHandle,'Auto Hybrid','display','2DAnd3D'); Field(tempHandle,'Auto Hybrid','cutPlaneElevation','1500'); Field(tempHandle,'Auto Hybrid','cutPlaneBase','layerElevation'); Field(tempHandle,'Auto Hybrid','displayCutPlane','Wahr'); Field(tempHandle,'Auto Hybrid','cutPlaneClass',''); Field(tempHandle,'Auto Hybrid','cutPlaneFill','useClass2DAttributes'); Field(tempHandle,'Auto Hybrid','cutPlanePen','useClass2DAttributes'); Field(tempHandle,'Auto Hybrid','displayExtentsBelowCutPlane','Wahr'); Field(tempHandle,'Auto Hybrid','belowCutPlaneRange','infinite'); Field(tempHandle,'Auto Hybrid','belowCutPlaneFiniteDepth','4000'); Field(tempHandle,'Auto Hybrid','belowCutPlaneClass',''); Field(tempHandle,'Auto Hybrid','belowCutPlaneFill','use2DAttributesOfContainedObjects'); Field(tempHandle,'Auto Hybrid','belowCutPlanePen','use2DAttributesOfContainedObjects'); Field(tempHandle,'Auto Hybrid','displayExtentsAboveCutPlane','Falsch'); Field(tempHandle,'Auto Hybrid','aboveCutPlaneRange','infinite'); Field(tempHandle,'Auto Hybrid','aboveCutPlaneFiniteHeight','4000'); Field(tempHandle,'Auto Hybrid','aboveCutPlaneClass',''); Field(tempHandle,'Auto Hybrid','aboveCutPlaneFill','none'); Field(tempHandle,'Auto Hybrid','aboveCutPlanePen','use2DAttributesOfContainedObjects'); Field(tempHandle,'Auto Hybrid','showAsReflectedCeilingPlan','Falsch'); Field(tempHandle,'Auto Hybrid','3DConversionResolution','high'); Field(tempHandle,'Auto Hybrid','bcpDashedHiddenLine','Falsch'); Field(tempHandle,'Auto Hybrid','acpDashedHiddenLine','Falsch'); Field(tempHandle,'Auto Hybrid','smoothingAngle','1'); Field(tempHandle,'Auto Hybrid','generateIntersectingLines','Wahr'); Field(tempHandle,'Auto Hybrid','shadeFactorIndex','2'); end; end;
  10. Hello, is it possible having a path-PIO acting like a wall? I want to insert doors an Windows and they should cut out their shape as they do in walls. Thanks in advance. CodeGier
  11. Hello, is it possible to read the direction out of a NURBS curve? In VW you can Change the direction in the info-bar but I find no way doing it with VectorScript. Bye CodeGier
  12. Hello, is there a possibility to save the Batch Rendering path in the vwx? Would be a nice feature. It's very boring to change this path every time I am rendering. Thank's for answering. CodeGier
  13. Hello, my VectorScript abilities are a bit rusty since I didn't anything with it for over a year. Testing the new VectorWorks a question comes up: How can I create the new auto hybrid object from vectorscript? Did'nt find anything about in in the 2013 function reference. What do I oversee? Thanks in advance Josef
  14. Hello Miguel, I used SetPolyClosed(polyHandle:HANDLE; isClosed:BOOLEAN); and it worked. Didn't find that in the function reference. Is it undocumented or new in 2012 (or am I unable to find it)? Thanks for sharing that. Josef
  15. Hello, I am working on the 2D look of a 3D path PIO using this function to convert a Nurbs into a polyline: FUNCTION Nurbs2Poly(aPathHD : HANDLE; aPos : REAL) : HANDLE; VAR h : Handle; BEGIN h := CreateOffsetNurbsObjectHandle(aPathHD, aPos); Nurbs2Poly := MakePolyline(h); DelObject(h); END; It works, but in VW2012 the polyline is closed. I do need an open one! Same behaviour with MakePoly the polygon is closed too. I tried to use OpenPoly with my code, but it didn't work either. Any idea how I get an open polyline (or polygon) out of my code? Thanks in advance. Josef
  16. Hello, using FUNCTION CreateTextureBitmapN ( shaderRecord:HANDLE ) :HANDLE ; gives me a Handle to a bitmap created with an upcoming dialog to choose the image file. Is there a way to do this without a dialog? I need a handle to a TextureBitmap created from a jpg or png file and do not find anything matching in the Function Reference. Thanks in advance. Josef
  17. First Beta of my Windows VectorScript Editor is available now: VectorScript Editor 0.50 Beta It works stable, and I use it for my own scripting regularily. Feel free to use it for your own work. Bye Josef
  18. It's folding whole procedures: procedure myProc; const myConst = 0; var myVar : integer; Begin End; Will be folded to: procedure myProc; ... The Keywords are imported from a textfile. You can feel free and edit it for your own convenience. By the way: I am hoping for a better integrated editor since VW11. Would be fatefull if the next version had a better one when I invested the work in my own ;-) Bye Josef
  19. Hello Windows users, For a current project I need to code on a Windows machine. As there seems to be a lack of available editors I decided to write my own. The main features are: Syntax colouring Code folding Code completion (on pressing ctrl-space) Showing available parameters when typing open bracket Exporting coloured code to HTML for posting in forums As it took me much more work to comlete the editor as I originally wanted I decided to share it with the VectorScript-community. To say "give the community something back.". If anyone here needs a Windows editor I will finish it to a state that anyone could work with it. If not then I will save my time. Please state the need here in the forum. Bye Josef
  20. Josh, Miguel, can't believe it was that easy! Thanks for pushing me in the right direction. Miguel I agree with your statement. It would be a very useful feature to have full control in drawing your hybrid PIO. Josef
  21. Hello, my 3D-Path-PIO needs different drawing in plain 2D-View. ActProjection := GetProjection(ActLayer); pathHd:= GetCustomObjectPath(objHd); IF pathHd <> NIL THEN BEGIN IF ActProjection = 6 THEN DrawPIO2D(pathHd) ELSE DrawPIO3D(pathHd); END; The problem: There is no redraw fired, when changing the views. So it draws not correct. Is it possible, to have a redraw of a PIO every time user changes the View? Josef
  • Create New...