Jump to content

LarryO

Member
  • Posts

    346
  • Joined

  • Last visited

Everything posted by LarryO

  1. While there is the linear PIO template which displays the 3D origin, z-axis rotation and vector length; It doesn't display a WorkPlane angle. Is there a hidden special parameter name for a second 3D control point or WP angle? Has anyone seen an example of setting up the OIP for this? Are there guidelines for presenting an object in the OIP which has two 3D defining points? It's not flat to the world x-y work plane. Could it be the first or second example, or both or something else entirely? 3Dpoint origin(x1,y1,z1), 3Dpoint2(x2,y2,z2) 3Dpoint origin,rotation (about the z-axis), WP angle (from the world x-y work plane), vector length. Larry
  2. Thanks Pat, I know you are with 99% probability correct. Today with a pre-defined 3D symbol that didn't contain the WF-3D PIO I was easily able to rotate it into the correct position. The concept of the environments inside and outside the PIO I have fairly down pat now. I created a stair and railing design tool about four years ago with the linear PIO template. I had that thing doing the flip and rotate dance all over the screen until I sorted out the relationship between an insertion point in the world origin and a PIO's internal origin. I may have to explore or rule out the possibility of a definition timing issue. When writing out a script for creating pickets in an inclined guardrail I had to separate it into a tool part and a linear object part. I simply couldn't capture the first set of control points inside the linear PIO. They had to be captured before creating the PIO using a creation tool. Aside from the WF-3D PIO, the original 3D symbol I attempted to rotate was defined inside the linear PIO. The PIO also places the instance which might not be created before the script attempts to rotated the instance. I forgot to put in a reset/regen. More testing required. Thanks guys for all the input.
  3. Thanks Pat, I was making sure I fully explored Raymond's suggestions to see if I could find a work around. I have not had any issue yet getting the handle to the Wide Flange - 3D object. The issue has been getting one of the rotation functions to rotate it about the y-axis while it is inside the linear PIO that I've been writing this script for. Or converting devolving it from the Wide Flange - 3D object to the basic extrude for rotation. Failed on that front too. SymbolToGroup and Ungroup don't work on it either inside the linear PIO. I'm beginning to think that it is the linear PIO environment that is interfering the 3D operations. I tried to rotate a 3D symbol instead of the PIO last night and got nothing on the x or y-axis rotations, only on the z-axis. So I will probably have to write my own steel extrusion routine, because lengthening the extrusion in a linear fashion is the way to go with this. The current tool is too clumsy to create 3D structural assemblies.
  4. Well guys, Julian , Ray, The fun continues. I was unable to convert an instance of a Wide Flange - 3D PIO to a group with SymbolToGroup() inside a linear PIO. (I ungrouped my linear parent PIO after it had finished and found the WF-3D PIO still existed.) I was also unable to rotate a 3D symbol about the Y-axis inside a linear PIO. I placed the Wide Flange - 3D inside a symbol, thinking that if I could rotate a symbol instance I could convert the symbol back to a group and ungroup that I could get the steel shape orientated in the direction of the control point. I am 100% sure that using LSActLayer is currently capturing a handle to the parent PIO and not the WF-3D PIO inside, which may rotate something other than the parent PIO once there a more objects in the layer. LNewObj does return the same WF-3D handle as the create custom object function. It's beginning to appear that the approach to tackling this little monster is to extract and import the beam data and create my own beam extrusion where the axial rotations can be set. Let's hope it is still possible to rotate or draw a polyline onto the y-z plane for extruding in the x direction. 🙂
  5. The first goal after getting this Wide Flange laid down in a beam position in plan view is to be able to draw in one like we do lines. Drawing them out in linear fashion point to point. Springing up out of the ground plane as these steel shapes do they easily serves as columns or posts, but not so as beams and rails.
  6. Hmmm, it does do a rotation but I'm fairly certain it's rotating the parent PIO and not the beam inside. Every time the PIO is reset it rotates to a new position, like when one changes the parent PIO's length either in the OIP or with the control point. I've never thought of a PIO being hybrid object like a symbol? Am I'm wrongly creating this 3D object in its 2D environment? EDIT: I don't think so. I'm leaning towards my earlier hypothesis that the 3D Rotation functions are looking to replace values in X and Y rotation parameters that don't exist or buggy pointers.
  7. You know I think that part of this puzzle lies in this description. There being no X or Y rotation values to be replaced in a point object's format could be the underlying problem here.
  8. Thanks, I'm still 😕 Adjusting for the missing zero Set3DRot(BeamHandle,0,45,0,0,0,0); I pasted in your text exactly. I tried it in a tool, a point, a linear and a palette script. All four produced a steel column at 0,0,0 rising perpendicular to x/y plane along the z-axis, not rotated 45° from vertical as was anticipated. Note that it does rotate about the z-axis, which is the location where I placed the missing zero value, in bold. So this responds Set3DRot(BeamHandle,0,0,45,0,0,0); but changing the value for the x or the y axis is doing nothing. I just don't get it. I don't really want to do my own beam oriented extrusions and lose the ability to pull data off their Wide Flange object. Oh well.
  9. thanks Julian, that is definitely a DOH! Homer moment for me. I've tried this in both a tool and linear object testing the bracketed lines one by one, VW2019 BeamHandle:=CreateCustomObjectN('Wide Flange - 3D',0,0,0,FALSE); SetRField(BeamHandle,'Wide Flange - 3D','__series_2', 'AISC (Metric)'); SetRField(BeamHandle,'Wide Flange - 3D','__size_2', 'W200 x 22.3'); SetRField(BeamHandle,'Wide Flange - 3D','Length', '3000mm'); SetRField(BeamHandle,'Wide Flange - 3D','__current_series', '2'); SetRField(BeamHandle,'Wide Flange - 3D','__current_size_2', 'W200 x 22.3'); {Rotate3D(0,45,0);} {HRotate(BeamHandle,0,45,0);} {Set3DRot(BeamHandle,0,45,0,0,0,0);} {SetRot3D(BeamHandle,0,45,0,0,0,0);} {Locus(0,0); SetSelect(LNewObj); SetSelect(BeamHandle); SetView(-90,0,0,0,0,0); DoMenuTextByName('Rotate Right 90',0);}
  10. Does anyone understand why it has to be so difficult to work the 3D steel shapes in VW? They all start as point objects extruded along the positive z-axis. I've tried to rotate the Wide Flange - 3D with all three rotation procedures Set3DRot ; SetRot3D ; Rotate3D (edit: and HRotate) and all I can accomplish is rotation about the z-axis. I went so far as to attempt to ungroup to see if I could rotate the extrude but neither ungrouping procedure HUngroup nor Ungroup works with this object. They both deselected the Wide Flange beam regardless of selecting Yes in the latter.
  11. It sounds like your angle precision is set less than your orthographic grid's precision. Your precision for ortho would be minimum of one decimal place more than the smallest dimension you measure to maintain accuracy. Then your angle accuracy needs to be better than that and that accuracy is also relative to the distance from the rotation point to which you expect accuracy. If you are rotating your environment to angles other than whole degrees and you do this at 5 metres from the origin but expect accuracy to 0.1mm at 100 metres you have lost 5%(or maybe it's 20%) of your accuracy by doing the rotation at only 5M, unless your are entering the rotation value from the keyboard.
  12. Correct me if I'm wrong, I don't use the referenced method very often, but aren't all the classes of the referenced file available to be turned off and on in the final document as subclasses of the referenced file name and or via the class setings of viewports? In which case they can be turned off and on via the class settings of a viewport instance. Create a duplicate of the viewport and alter the class visibility(s).
  13. Yeah, I've not given up quite yet. While it would be great to use the SDK, first I would have to learn the terminology and idiom used to describe and operate in that environment. It was one thing many years ago to learn APL, Pascal, Basic+ and tackle a bit of PL1 and C+ but it is quite another I found out to find (and afford) appropriate compilers and environments, then install them in the manner that they work together to generate a properly formatted executable. In one instance I had purchased a copy of Metrowerk's CodeWarrior to learn more C++ after work only to have the product discontinued before fully understanding its environment. I never got to writing a single line of useful project code. Anyways, I was thinking that I might see what the limitations are of the static parameter as a storage medium. There is also possibly a means to create a worksheet and store info in it outside of the PIO, or maybe create symbol definitions and store each node's the control point location and object data as a line of text in a text object. It seems possible to retrieve any of these options and write out the data to a temporary external text file and then read/parse it back into a structured dynamic array. From there I can initialize a control point parameter for the first node in my beam and sequentially rotate thru the other nodes one by one with just the one control point parameter. Saving both the control point location and the node's object data back to which ever means is found to be most suitable. Now that I'm thinking of it, if a PIO can create a Symbol Definition instance it wouldn't be that difficult to attach a record and define the fields required then plunk the data in. It would be quite useful to have both the editable plugin instances laid out for display and linked symbols that can be assembled into a 3d model to check alignments of the connections and have the visual model. A lot of ifs. Conceptually I think it's possible with only Vectorscript. Time to begin a few tests! Maybe I'll be able to rework my beam layout tool into something useful.
  14. VW2013 had a language guide that included defining structured variables and the compiler conscripts like $INCLUDE, $IF, etc. Looking for the location of the Windows version. It used to be a pdf in a VWhelp folder. on the Mac it was an app that was a cross between a web browser and an ebook. I guess I could dig up the 2013 version; not much is likely to have changed if anything.
  15. Is there a means to store control point locations in the PIO's record in say a structured variable? The point of the question is to limit the visible control points to the currently valid locations. Locations where an object like a symbol has been linked in and is being tracked. Similar to a polyline vertex arrangement, but in my case end points and one of the possible multiple points between. The quantity of between points is variable, because having potentially 30+ control point parameters when typically only 16+/-8 will be required/used seems like a really bad plan. Larry
  16. Looks interesting Pat, and admittedly much clearer organization than mine, hehehe. You allowed the user the ability to move the washer and nut but I couldn't find if there was a limiter in there to ensure the minimum two threads above the nut. Myself I have (for now) foregone entering the whole table matching thread count to bolt diameter and simply approximate the amount that must extend above the nut. I'm about 3mm over on 1" size and almost true at 1/4" size. Some day I may become inspired and work some more on this but for now I happy that today I have filled in all the size gaps up to 1" in 1/8" increments. I wasn't aware of the full size range when I began this wedge anchor until after I had hard coded the use of the first three characters to represent the diameter. Our shop doesn't use 5/16" and the engineer's in the area use epoxied rod more often than not for 1" and over. The other aspect with imperial stuff is that many times the sizes are nominal, which is possibly the case for the lengths associated with the 1" diameter material in this product. So this is just a close visual representation of one manufacturer's product. Perhaps when I get to creating a threaded rod with nut and washer options for both ends I will include a subroutine to accurately determine the two thread offset. In light of all the hatches and snippets of code that I have borrowed from various places over the past 25 years, attached is an updated working tool, sans icon. Past icon attempts have all failed miserably. Wedgie Anchor.vso
  17. Thanks Guys, With your insight I have found the issue. Raymond, you were almost right. I'm not sure exactly how NNA does this but the first parameter chooses which list of values to display when the user activates the pull down (that part is easy) (example: regular hex nut = make visible and display the values in size_1, heavy hex nut = make visible and display the values in __size_2 and so on) but they then seem to somehow transfer that directly to the 'size' parameter. Their plugin only responds to values entered into the 'size' parameter. My bad it turns out is that I am replacing the "size" parameter with a decimal equivalent of the fractional value. ie: '0.625' instead of '5/8'. The latter seems to be what their script expects but somehow that didn't kill the script. It chimed instead and then possibly converted it to a real again internally and finished its task. The "__NNA_DO_NOT_CHANGE" I believe is NNA's way of saying to the various distributors to not localize the name into the regional language. I made a number of attempts to use those other parameters early on by hard coding in different values like '3/4' etc but their plugin script does not seem to check upon the value stored in those various parameters that hold the value lists, even after issuing a ResetObject(). It looks like I'm going to have to create a clumsy case statement to match up decimal values to fractional representation to shut the thing up. This is what makes all of this fun, isn't that right!? 😂 PS: Then again maybe not, I already have those in the initial selection process
  18. Thanks, but no change and nothing popped up in a message window.
  19. Does anyone know why my script chimes every time it is selected from the tool sets, every instance at placement and anytime I use one of the pop-up selections? I originally wrote this for VW2013 but other than the chiming it works fine in VW2019. PROCEDURE Wedgie_Anchor; VAR Bool1:BOOLEAN; TempI1:INTEGER; LongI1,LongI2:LONGINT; BoltLength,ShaftRadius,ShaftLength,ThreadLength,rSlot,rHeight,NutThickness,WasherThickness, DocUPI,SelectPtX1,SelectPtY1,SelectPtX2,SelectPtY2,RingThickness,rETBN:REAL; Units2Mark,UnitsMark,PIO_Name:STRING; PIO_Handle,PIO_Record,PIO_ParentWall,ObjHandle,hWasher,hNut:HANDLE; ar3BoltSize:ARRAY[1..3]OF CHAR; TempArray:ARRAY[1..16]OF CHAR; TempDynArray:DYNARRAY[]OF CHAR; BEGIN {Parameter Visibility} Bool1:=GetCustomObjectInfo(PIO_Name,PIO_Handle,PIO_Record,PIO_ParentWall); IF PAnchorSize='Custom' THEN BEGIN SetParameterVisibility(PIO_Handle,'BDiameter', TRUE); SetParameterVisibility(PIO_Handle,'OALength', TRUE); END ELSE BEGIN SetParameterVisibility(PIO_Handle,'BDiameter', FALSE); SetParameterVisibility(PIO_Handle,'OALength', FALSE); END; {PushAttrs;} GetUnits(LongI1,LongI2,TempI1,DocUPI,UnitsMark,Units2Mark); ar3BoltSize:=PAnchorSize; IF ('3/8'=ar3BoltSize) | ('1/2'=ar3BoltSize) THEN WasherThickness:=1.6mm {1.6mm = 3/8" & 1/2" Narrow washer thickness} ELSE WasherThickness:=2.5mm; {2.5mm = 5/8", 3/4" & 1" Narrow washer thickness} RingThickness:=((Str2Num(ar3BoltSize)*8)-1)*0.5mm; BoltLength:=POALength; {Extra Thread Beyound Nut - rETBN} rETBN:=WasherThickness+DocUPI*Str2Num(ar3BoltSize)*1.5; {BOLT DIAMETER formula is DocUPI*Str2Num(ar3BoltSize)} ShaftRadius:=DocUPI*Str2Num(ar3BoltSize)/2; TempArray:=PAnchorSize; TempDynArray:=TempArray; Delete(TempDynArray,1,6); TempI1:=Pos('"',TempDynArray); Delete(TempDynArray,TempI1,TempI1); BoltLength:=DocUPI*(Str2Num(Copy(TempDynArray,1,TempI1))); IF PAnchorSize='Custom' THEN BEGIN rETBN:=PBDiameter*1.5; ShaftRadius:=PBDiameter/2; BoltLength:=POALength; END; {formula for expansion portion is ratio from Ø3/8" anchor which is 1" Long to Ø5/8" anchor which is 1.5" Long} ThreadLength:=BoltLength-25.4mm-2*(ShaftRadius*2-9.525mm); ShaftLength:=Boltlength-ThreadLength; Locus(0,0); {Orgin indicator} {Threaded end} OpenPoly; BeginPoly; AddPoint((-ShaftRadius+0.53mm),3.175mm); AddPoint((-ShaftRadius+0.53mm),0.0); AddPoint(-ShaftRadius,0.0); AddPoint(-ShaftRadius,-ThreadLength+3.175mm); AddPoint((-ShaftRadius+1.95385mm),(-ThreadLength)); AddPoint((ShaftRadius-1.95385mm),(-ThreadLength)); AddPoint(ShaftRadius,-ThreadLength+3.175mm); AddPoint(ShaftRadius,0.0); AddPoint((ShaftRadius-0.53mm),0.0); AddPoint((ShaftRadius-0.53mm),3.175mm); EndPoly; ObjHandle:=LNewObj; HMove(ObjHandle,0.0,ThreadLength-rETBN); {Threads} MoveTo((-ShaftRadius+0.53mm),ThreadLength-rETBN); LineTo((ShaftRadius-0.53mm),ThreadLength-rETBN); MoveTo(-ShaftRadius,3.175mm-rETBN); LineTo(ShaftRadius,3.175mm-rETBN); {The following 2 lines are drawn as hidden lines} PushAttrs;LSByClass;LWByClass;PenColorByClass;NameClass('Pen_0.13-Hidden'); MoveTo(-ShaftRadius+1.06mm,4mm-rETBN-2.58375mm); LineTo(-ShaftRadius+1.06mm,ThreadLength-rETBN); MoveTo(ShaftRadius-1.06mm,4mm-rETBN-2.58375mm); LineTo(ShaftRadius-1.06mm,ThreadLength-rETBN); PopAttrs; {Tapered end} BeginPoly; AddPoint(-ShaftRadius+3/64",3.175mm); AddPoint(-ShaftRadius+1/64",BoltLength-(ThreadLength+1mm)); AddPoint(ShaftRadius-1/64",BoltLength-(ThreadLength+1mm)); AddPoint(ShaftRadius-3/64",3.175mm); EndPoly; ObjHandle:=LNewObj; HMove(ObjHandle,0.0,ThreadLength+RingThickness-rETBN); {Begin Expansion Collar} rSlot:=((ShaftRadius*16)-1)/64; {1/2 SLOT WIDTH} rHeight:=ShaftRadius+9.525mm; {Overall height of Collar} IF ShaftRadius<=4.7625mm THEN rHeight:=rHeight-3.175mm; {Bumps on Expansion Collar} ArcByCenter(ShaftRadius-3.175mm, rHeight/2+ThreadLength+RingThickness*2+3.175mm-rETBN, 3.969mm, 323.13, 73.74); ArcByCenter(-ShaftRadius+3.175mm, rHeight/2+ThreadLength+RingThickness*2+3.175mm-rETBN, 3.969mm, 143.13, 73.74); PushAttrs;FillPat(1); ClosePoly; BeginPoly; AddPoint(-ShaftRadius,0.0); AddPoint(-ShaftRadius,rHeight); AddPoint(-rSlot,rHeight); ArcTo(-rSlot,rHeight/2,0); AddPoint(0.0,rHeight/2); ArcTo(rSlot,rHeight/2,0); AddPoint(rSlot,rHeight); Addpoint(ShaftRadius,rHeight); Addpoint(ShaftRadius,0.0); AddPoint(rSlot,0.0); ArcTo(rSlot,rSlot,0); AddPoint(0.0,rSlot); ArcTo(-rSlot,rSlot,0); AddPoint(-rSlot,0.0); EndPoly; ObjHandle:=LNewObj; HMove(ObjHandle,0.0,ThreadLength+RingThickness*2+3.175mm-rETBN); PopAttrs; {End Expansion Collar} {Draw Expansion Stop Ring} Rect(-ShaftRadius,ThreadLength+3.175mm-rETBN,ShaftRadius,ThreadLength+3.175mm-rETBN+RingThickness); {Draw Washer} PushAttrs;FillPat(1); hWasher:=CreateCustomObjectN('Plain Washer (Inch)',0.0,-WasherThickness,0.0,FALSE); SetRField(hWasher,'Plain Washer (Inch)','series','Type B - Narrow'); {SetRField(hWasher,'Plain Washer (Inch)','size',ar3BoltSize);} SetRField(hWasher,'Plain Washer (Inch)','size', Num2Str(3,2*ShaftRadius/DocUPI)); SetRField(hWasher,'Plain Washer (Inch)','view','Front'); SetRField(hWasher,'Plain Washer (Inch)','showCL','FALSE'); PopAttrs; {End Washer} {Draw Nut} PushAttrs;FillPat(1); hNut:=CreateCustomObjectN('Nut (Inch)',0.0,WasherThickness,0.0,FALSE); SetRField(hNut,'Nut (Inch)','typeIndex','Hex Nut - Heavy'); SetRField(hNut,'Nut (Inch)','size',Num2Str(3,2*ShaftRadius/DocUPI)); SetRField(hNut,'Nut (Inch)','view','Front'); SetRField(hNut,'Nut (Inch)','showCL','FALSE'); Hrotate(hNut,0.0,0.0,180d); PopAttrs; {End Nut} {PopAttrs;} END; {Larry Osolin 2013, not for resale and or redistribution without credit and written approval please.} RUN(Wedgie_Anchor);
  20. I posted an issue that I continue to have with rendering 3d objects under the Trouble Shooting section. See Why are these lines rendering? Another user added their "me too" statement to which I responded with additional information. Now suddenly that forum indicates that the issue has been answered, which it has not. Am I expected to repost whenever someone comments instead of supplying an answer in an effort to have it recognized as an outstanding issue??? Larry
  21. There are a couple of other basic functionality issues with rendering that keep me from doing more 3d work in VW. Like OpenGL not rendering section viewports with shadows and grey tones. Not being able to figure out how to define a hatch to appear where an object is in section like cutting through a steel beam results in solid black, again a section viewport.
  22. The smoothing angle should be preventing both of these lines from rendering. They represent the end of the fillet arc between the flange and web on a W shape beam. The beam has pieces cut from and added to it. If changed from dashed hidden line rendering to hidden line rendering the dashed line will be removed. So this is two different functions that are not operating as expected. Both should should be r eacting to the smoothing angle setting.
  23. This may be of some help or not. By grouping a normal viewport you can copy and paste it to another file, but knowing that some attributes will not be carried over. for instance the layers it is linked to are not carried over. The latter I believe is because the viewport does not have the functionality to create any missing layers where as missing classes and their attributes will be created simply through the act of copying the objects into the file beforehand. So that said some functionality of a viewport must be setup/entered into the file for a view port to function correctly which is why I suspect the application is set up to prevent direct copying of viewports from file to file.
  24. @Ardillas Nuh You might get a more informed response by posting your question in its own thread, but I'll give it a try. My question is can we create this parametric object in vectorworks? Yes parametric objects can be created in VWs. Windows and doors already exist as parametric tools and can be placed into walls. These are 3d objects. If you require additional functionality that is not available in the current window or door tool, you can create your own parametric tool. Whether the effort is worth the investment depends upon the frequency your office intends to utilize the custom door or window. The best and most flexible parametric objects are created using code but simple scalable symbols (blocks) are also an option. And while dimensions can be linked to objects and utilized to reshape them, the functionality is not the same as Revit where dimensions are utilized as constraints to create reusable parametric models that are commonly exported as library files. Contact your local VW sales to get a 30 day trial and explore the options.
  25. The grid spacing is easy to determine or set by double clicking the snap to grid icon. This will the bring up the smart cursor options allowing you to read the current spacing and change the grid spacing.
×
×
  • Create New...