Jump to content

joshtreverton

Member
  • Posts

    23
  • Joined

  • Last visited

Everything posted by joshtreverton

  1. Hi All, This might seem like a really easy question, however I will ask it anyway: I am using the RealDialog function to change the wall width of my a wall I am inserting the PIO in to (shown below) WallW:=RealDialog('The wall thickness must be either 100 mm. By changing the wall thickness this will remove the wall style. Please enter a new wall thickness.','100'); IF (WallW <> 100) THEN done:=TRUE; UNTIL (WallW = 100); IF NOT DidCancel THEN BEGIN WallBool := ConvertToUnstyledWall(wallHd); WallBool := DeleteAllComponents(wallHd); WallBool := SetWallThickness(wallHd, WallW); SetRFiel(PIOName,recname,'WallWidth',Num2Str(0,WallW)); END; If the end user presses cancel I want to be able to cancel the whole script and delete the PIO, which functions would I need to use to be able to do this? Thanks, Joshua
  2. Thanks for your responses guys, I have used the SetProjection as you guys recommended, and have used Move3DObj instead of HMove, which made a small improovement... However I have realised what was causing my problems: Firstly, the hDuplicate function works in 2D not 3D so that is probably causing problems... Secondly, The geometry is distorted when I have been duplicating an object then flipping it around a Locus, i.e. Move3DObj(RHSarchitrave3D, ((PW/2)+SideJambThk), 0, 0); LHSarchitrave3D := HDuplicate(RHSarchitrave3D,0,0); DSelectAll; SetSelect (LHSarchitrave3D); Locus (0,0); locHdl:= LNewObj; FlipHor; DelObject(locHdl); does anyone know of a way around this? I am creating a PIO with curved geometry so it flipping around a Locus really is the only way that I can do some of the things that I want to do...
  3. It turns out that switching to SetView(0,0,0,0,0,0) then reverting back to the original view point works however it then messed up some of the geometry in the plug-in, especially geometry which is Duplicated and moved... Has anyone had experience with this and how to fix it?
  4. Thanks Hip-Hop-othamus The GetView function did exactly what I wanted without it affecting the sweeps ect... Cheers p.s. Maarten you are right about the 2D/Plan view switching to Top, but it's a small price to pay really... Problem solved!
  5. Maarten Yeah I looked in to extruding along a nurbs path but found that the geometry doesn't load untill the end which meant that I couldn't add or subtract other objects with the extrude... I just want to revert the view back to the start such that the end user doesn't need go back to their previous view once they change the plug-in... cheerrs Josh
  6. Hi All, Just a quick vectorscript question, I am creating a plug-in which uses various sweeps and Move3D commands, to make the geometry perform correctly at the start of the script I have to reset the view and orientation using: SetView(#0d,#0d,#0d,0,0,0); however this is irritating for the end user, it there a way to copy the current view then set the view as (#0d,#0d,#0d,0,0,0) then at the end of the script return the back to the original view... Cheers, Josh
  7. Just the ticket, thanks Kevin! The loci where in a group so weren't working as they should, now the loci work as intended. Josh
  8. The Loci makes the cut as intended, however as soon as I try to have the architrave outside the loci the hole in the wall then streches to the outer limits of the architrave... I'm pretty sure that I am just missing a trick or something... Cheers Matt Joshua.
  9. Thanks Matt, I got the SetCustomObjectWallHoleGroup to work as intended, however my problem is trying to get it to work in Plan 2D view... Does anyone know how to do this? Cheers, Joshua
  10. Hi All, I am creating a door PIO (will be free to everyone once complete) and I was wondering if there was a way to to have architraves which project out from the hole in the structural opening without creating a larger hole in the wall. The built in Doors can do this but I am unsure how to do it. Thanks, Joshua
  11. A lot more impressive is this: http://www.nationalbimlibrary.com/jacksons-fencing Although parametric objects on Vectorworks tend to be a lot trickier then REVIT, the NBL have said that they are committed to bring the same objects (and their functionality to each platform)
  12. A-Ha Right, I worked out the problem was with my AddSolid code, one of the conponents wasn't forming correctly which resulted in the Handle not being true. Thanks to JBenghiat (Josh) and anyone else who looked. Joshua.
  13. Cheers Josh I was looking at my script and got it to work, the problem arose when I was trying to use that code on a component which was created from AddSolids' then I can't get it to work... I can't seem to be able to select the handle of the new component after using the: result := AddSolid(h1, h2, Handle); SetClass (Handle, pClassAAA); Is there an exttra step I can take to correctly get the handle to the new solid? Josh.
  14. Hi All, I am working on a PIO which is made up of serveral different components, each component is set with the default class of the overall PIO. Using the 'Classes Pop-up' in the parameters list I have created 3 classes pop-ups so that each of the three components can have independant classes. What script do you use to assign each component to a classes pop-up? So far I've been using this with no luck SetClass (Handle, pClassAAA); SetFillColorByClass(Handle); SetPenColorByClass(Handle); SetFPatByClass(Handle); SetLWByClass(Handle); SetLSByClass(Handle); Any help would be great. Cheers Joshua
  15. A-Ha, Excellent, I've not had much experience of using Loci so didn't know that they behaved just like any other object. The script worked as I wanted, Thanks Miguel. Joshua
  16. Hi All, In 2D I am drawing a curved segment and then Duplicating and Flipping the segment around a Locus. Once segment has been Duplicated and Flipped is there a way of either hiding or getting rid of the Locus pt. such that it doesn't appear? It really needs to be part of the script, or alternativel is there a way of Mirroring the segment around 0,0 without the need of Locui? Here is the script extract: Procedure DrawCurve2D; BEGIN FillPat(0); BeginGroup; BEGIN Arc(-2000-62.5,62.5,2000+62.5,-2000-62.5-2000,30,30); Arc(-2000+62.5,-62.5,2000-62.5,-2000+62.5-2000,30,30); END; Rotate3D(#90d,#0d,#0d); DSelectAll; MoveTo (0,62.5); LineTo (0,-62.5); RotatePoint (0, -2000, -(90-30)); DSelectAll; MoveTo (0,62.5); LineTo (0,-62.5); RotatePoint (0, -2000, -(90-30-30)); DSelectAll; EndGroup; Duplicate(0,0); Locus(0, 0); FlipHor; END; RUN (DrawCurve2D); Cheers, Joshua
  17. Raymond, That's great cheers, I have never really got the hang of Locus (although they have always looked useful from afar...) I think that I will just have to re-write my script to use sweeps instead, which should overal reduce the length of my script anyway... Thannks. Joshua
  18. Thanks Raymond, The second script worked, however, Saddly you're right I really need it all to execute within one script. Is there a way to force the EAP object to execute first or wheather there is a function to 'Convert to Generic Object' such that the two objects can then combine? Or if I was using a Sweep is there a way of setting out a point outside the polygon which to sweep around? Cheers, Joshua
  19. In the VectorWorks environment, as you say, it is easy to combine the two, it is within the script that I can't seem to get it to work... Saddly it must be done 'in-script'. Thanks for your comment though.
  20. Kevin, I am now trying to get a solid extrude and an 'extrude along path' which were created in septerate procedures to combine. I can't seem to get them to work I think that the problem is how to get the AddSolids function to recognise the handle of the path object... Any help? e.g. Procedure AddSolidTest; VAR result:INTEGER; tempHandle, tempHandle1, tempHandle2:HANDLE; objectHandle:HANDLE; ArcNurbed:HANDLE; CurvedWall3D:HANDLE; Procedure DrawPolgonA; BEGIN FillPat(1); FillBack(65535,65535,65535); BEGIN Arc(-2000,2000,2000,-2000,45,90); objectHandle := LNewObj; ArcNurbed:= ConvertToNURBS (LNewObj, FALSE); END; BeginGroup; ClosePoly; Poly(-62.5,2000,62.5,2000,62.5,0,-62.5,0); objectHandle := LNewObj; EndGroup; tempHandle2 := LNewObj; objectHandle := CreateCustomObjectPath('Extrude Along Path', ArcNurbed, tempHandle2); CurvedWall3D := LNewObj; hMove(CurvedWall3D, 0, -1800); DSelectAll; END; Procedure DrawPolgonB; BEGIN BeginXtrd(-1000,1000); Poly(-30,200,50,500,3,-62.5); EndXtrd; tempHandle2 := LNewObj; DSelectAll; END; Procedure DrawAddSolid; BEGIN result := AddSolid(CurvedWall3D, tempHandle2, tempHandle); message(result); END; BEGIN DrawPolgonA; DrawPolgonB; DrawAddSolid; END; Run(AddSolidTest);
  21. Excellent That worked exactly as I wanted, the confusion lay with it working as a script in a Script Pallette but not in a PIO Cheers klinzey
  22. Can someone help I am trying to add two solids created in vectorscript, I have been testing how to do this : The script works when I run it as a vectorscript in the resource browser, however when I use the script in a PIO the two solids don't combine... This is the script I've been using: Procedure AddSolidTest; VAR result:INTEGER; tempHandle, tempHandle1, tempHandle2, objectHandle:HANDLE; BEGIN BeginXtrd(0,80); ClosePoly; Poly(-80,-17.5,0,62.5,0,-62.5); objectHandle := LNewObj; EndXtrd; ResetOrientation3D; BeginXtrd(0,80); Poly(-30,200,50,500,3,-62.5); objectHandle := LNewObj; EndXtrd; ResetOrientation3D; tempHandle1 := LObject; tempHandle := PrevObj(tempHandle1); result := AddSolid(tempHandle, tempHandle1, tempHandle2); ResetOrientation3D; END; Run(AddSolidTest); It is just a test for something that is alot bigger, as I say I just can't get it to work when using the script as a Plug-in (I have the same problems when I try and subtract solids also). Has anyone else managed to get add solids to work in a PIO Ta Josh
  23. Taoist, Was wondering if I could view that video, I get a 403 message when trying to open it...
×
×
  • Create New...