Jump to content

LarryO

Member
  • Posts

    346
  • Joined

  • Last visited

Everything posted by LarryO

  1. Here is one that the team probably did not anticipate when programming. I have an in house developed titleblock plugin that inserts a titleblock symbol which is of the 2D page based type, not world units. #1 When I am editing annotation in a viewport which is on a sheet along with the titleblock plugin we get the following occurring. And being able to snap to the enlarged shadow of the titleblock plugin. #2 When one exits the annotation environment of the viewport the titleblock plugin boundaries are much bigger than the symbol within. The size difference is the scale factor (1:12) of the recently edited viewport. After editing the instance (changing some aspect in the object info palette) of the plugin its bounding box returns to correct size. I've attached a screen shot of the ghosting taken in annotation mode and of the portion of the titleblock seen. The D of ACCORD which is not text but a polyline with red fill.
  2. Does anyone know if character stacking is possible or not in VW2019? OS X Going back many years, some programs and certain operating systems had a means to type one character over the other without deleting the first character. You could type the box glyph, then press the backspace key (the key did not function as a delete command it simply moved the cursor back a space as the name implies), then type a check mark glyph and the display would show a checked box. You could type "xxxxx" or em dashes over top of an existing string of characters, without having to align two independent text boxes.
  3. Thanks Guys, when the office finally gets my new workstation purchased I think I will invest a little more time fixing the script behind the company's titleblock. The Python call sounds like something worth figuring out. Its always been a pain making two subroutines simply because the data arrives differently between MAC & PC's. The next task after this is to hopefully get a few more Unicode character glyphs printing on the new PC's. I'm losing my MAC in the upgrade but gaining VW2019. For some apparent reason boxes, check marks and almost equal were easy to type and print on the MAC but seemingly impossible on a PC running VW2015. check marks would display but never print and I couldn't even get my PC laptop to display almost equal in VW2013 dimensions.
  4. You can also write a vectorscript and/or python script to read the system date and write the date to a linked text field in your own symbol. A plugin can insert an instance of your symbol and then write the date data to a predefined field in your symbol.
  5. Has anyone else noticed that with VW2019 that the separators on the Mac platform have changed from forward slash "/ " to hyphen "-"? Also Date(2,0); VW2019 generates yy-mm-dd where as VW2013 generated mm/dd/yy on the same MacBook Pro. Did the function get tweeked to generate the same output regardless of MAC/PC platform? If so, would have been nice to also make the month and day always generate 2 digits. PCs generated hyphens and MACs forward slashes. I don't recall it ever being system setting sensitive but it was definitely platform sensitive.
  6. I can't see how RunTempTool could work. One has to pass it a Function and GetPt and GetPtL can only be called from a Procedure. I experimented vstGetPt2D also choosing index #0, 1 and 2. Zero returns the world coordinate point for the PIO origin and one returns the second world coordinate point of the linear PIO. Two returns garbage, not the control point location. I do not think that these user interactive calls can work in a linear PIO. Once the PIO environment is created they crash and burn because they seem to be seeking information from the world environment that is somehow not available to them anymore. So it would seem that I am stuck with what I have or taking some lessons on creating a custom tool to collect three points then call the linear PIO and somehow pass the values onto the procedure. While still permitting the procedure to act alone in regenerating itself after OIP changes and dragged point changes. hmmm
  7. Thanks Josh & Raymond for the assistance. I still have to tackle moving my control point into position so that it remains vertical to the origin in World space and making the code flip friendly. The latter I've done before so it will not be too much trouble. I still hope to figure out how to have GetPt retrieve values and pass them into a variable before the code finishes. It'll be such a pain if I have to deselect the tool every time to move the control point into position (it identifies the upper boundary of the pickets) and then re-select the tool to draw the next set of pickets. This is a functional result, but has limitations. Only works from left to right ATM. It still has fluff code in it and some clarity formatting was lost during pasting. Procedure Picketeer; VAR PIO_Handle,PIO_ParentWall,PIO_Record,hLine1,hLine2: HANDLE; PIO_WorldOrigin: POINT; PIO_Rotation,rOffsetDistance:REAL; iAccuracy: INTEGER; Quantity: LONGINT; PIO_Name:STRING; Bool1:BOOLEAN; cpLocation,cpDestination: VECTOR; {This Function may be required during improvements, leave in} Function HDuplicatePolar(H :Handle; Dist, Ang :Real) :Handle; { Same as HDuplicate() using POLAR coordinate input } Var V :Vector; Begin V := Ang2Vec(Ang, Dist); { convert polar to rectangular} HDuplicatePolar := HDuplicate(H, V.x, V.y); End; { Function HDuplicatePolar} BEGIN PushAttrs; FillColorByClass; FPatByClass; PenColorByClass; LSByClass; LWByClass; MarkerByClass; OpacityByClass; {initialize required variables' values} Bool1:=GetCustomObjectInfo(PIO_Name,PIO_Handle,PIO_Record,PIO_ParentWall); GetSymLoc(PIO_Handle,PIO_WorldOrigin.x,PIO_WorldOrigin.y); PIO_Rotation:=HAngle(PIO_Handle); {IF GetPrefReal(152)=1.0 THEN iAccuracy:=4 ELSE iAccuracy:=0;} {imp vs mm, currently not req'd} cpLocation.x:=PControlPoint01X; cpLocation.y:=PControlPoint01Y; cpDestination:=Ang2Vec(PIO_Rotation, PLineLength); Quantity:=0.5+(cpDestination.x+PPicketSize)/(PMaxGap+PPicketSize); {includes final picket which is replaced by next post} rOffsetDistance:=(PlineLength+Ppicketsize)/Quantity; {centre to centre picket spacing} MoveTo(0.0,0.0); {creating first picket} LineTo(0.0,NORM(cpLocation)); hLine1:=LNewObj; HRotate(hLine1,0,0,-PIO_Rotation); {orient first picket line vertically} hLine2:= HDuplicate(hLine1, -PPicketsize/Cos(Deg2Rad(-PIO_Rotation)),0); Hmove(hLine1,rOffsetDistance,0.0); {Move first pickets into place. Could have started at this location instead of orgin.} Hmove(hLine2,rOffsetDistance,0.0); {Easier debugging of flip & rotation issues} While (Quantity>2) Do {place remaining pickets} BEGIN hLine1:=HDuplicate(hLine1,rOffsetDistance,0.0); hLine2:=HDuplicate(hLine2,rOffsetDistance,0.0); Quantity:=Quantity-1; End; PopAttrs; END; RUN(Picketeer);
  8. The pickets are only a series of lines on the slope of the rail. I group them when drawing them manually. So I am capturing 3 points and pre-setting picket diameter and max gap values. The nature of doing shop drawings, updating for site measures is that I created a tool which defines the measured stair with only two points and a few pre-set building code defined values; drawing in top and bottom rails that can be traced over or used as is. Then we manually place posts due to the variety of (un)suitable anchoring conditions, locations and styles that seem to occur within a single flight sometimes. And finally draw in pickets where required on a separate layer to make them print grey). So I am finally getting around to making a plugin to automate the task of calculating quantity and then spacing them equally along the incline of the rail. Hence my desire to simplify it all down to a three point task (2 steps) from what is currently about 12-14 steps if one does them in the correct order. I'm sure that the SetRField works as you say it does; I just have a problem mixing up strings and character arrays all the time. ATM I am trying to decide if I should Create the first line and copy along the incline or or draw along the axis and rotate them all into position. The latter is how I approached the stair tool because HDuplicate(objecthandle, distancevariable, # anglevariable d); fails. The angle mode indicator # does not appear capable of accepting a value from a variable. So much simpler if Polar vector variables were an option.
  9. I've had issues with using a variable in the name location of SetRField so I've always typed it in. The thing is that the control point is not moving to the user selected point location. I suspect GetPtL is not capturing values during first pass. The control point remains at the default location set by the parameter default values. The exercise here is an attempt to have the control point set during the first run (placement) of the plugin and not have to drag it over to the correct location afterwards.
  10. I would guess from what I have observed is that GetPt and GetPtL are not suitable for inside a Plugin object (VW2013). This will display the Message and draw the Line and request a point from the user. Bool2:=FALSE; IF IsNewCustomObject(PIO_Name) THEN Bool2:=TRUE; IF Bool2 THEN Message(cpHeight.y,'x',bool2); IF Bool2 THEN GetPt(cpHeight.x,cpHeight.y); MoveTo(0,0); LineTo(0,0); This will draw the Line and request a point from the user, but not display the Message. Bool2:=FALSE; IF IsNewCustomObject(PIO_Name) THEN Bool2:=TRUE; IF Bool2 THEN GetPt(cpHeight.x,cpHeight.y); IF Bool2 THEN Message(cpHeight.y,'x',bool2); MoveTo(0,0); LineTo(0,0); This will draw the Line and request a point from the user, but not display the Message. Bool2:=FALSE; IF IsNewCustomObject(PIO_Name) THEN Bool2:=TRUE; IF Bool2 THEN GetPt(cpHeight.x,cpHeight.y); MoveTo(0,0); Message(cpHeight.y,'x',bool2); LineTo(0,0);
  11. Some curious activity happens with this preliminary scripting. Testing units are mm. Message screen is displayed before closing plugin's default record initialization dialog. Message screen is updated to reflect changes in default record initialization dialog before GetPtL point has completed selection. GetPtL doesn't save value of point selected. Zero is being displayed as value stored in cpHeight.y And finally ControlPoint01Y is not being overwritten with the value in cpHeight.y. (perhaps cpHeight.y is NIL and not zero, but Message displays 0 and not NIL) What am I not understanding? VAR PIO_Handle,PIO_ParentWall,PIO_Record: HANDLE; PIO_WorldOrigin: POINT; PIO_Rotation,rTemp:REAL; iAccuracy: INTEGER; Class_Name,PIO_Name:STRING; Bool1,Bool2:BOOLEAN; cpHeight: VECTOR; BEGIN PushAttrs; FillColorByClass; FPatByClass; PenColorByClass; LSByClass; LWByClass; MarkerByClass; OpacityByClass; Class_Name:=ActiveClass; Bool1:=GetCustomObjectInfo(PIO_Name,PIO_Handle,PIO_Record,PIO_ParentWall); GetSymLoc(PIO_Handle,PIO_WorldOrigin.x,PIO_WorldOrigin.y); IF GetPrefReal(152)=1.0 THEN iAccuracy:=4 ELSE iAccuracy:=0; IF IsNewCustomObject(PIO_Name) THEN BEGIN GetPtL(0.0, 0.0, cpHeight.x, cpHeight.y); SetRField(PIO_Handle,'_StairOutline','ControlPoint01X',Num2Str(iAccuracy, cpHeight.x)); SetRField(PIO_Handle,'_StairOutline','ControlPoint01Y',Num2Str(iAccuracy, cpHeight.y)); END; MoveTo(0,0);LineTo(cpHeight.x,cpHeight.y); MoveTo(0,0);LineTo(600,0.0); {ResetObject(PIO_Handle);} Message(PControlPoint01Y,'x',cpHeight.y); PopAttrs; END;
  12. Sounds like a control point is the way to go. I'm spacing pickets between two posts of a sloping guardrail on a frequent basis. It is much simpler to graphically determine the height between the top and bottom rails than it is to calculate it. Same goes for the slope and linear path. We've currently got a reasonably quick manual strategy but it requires about a dozen steps for each panel, each time there is an adjustment to the guardrail.
  13. Thanks for a quick response. I'm wondering whether a control point might work in lieu of a third point during placement. I've not used them before so I will have to experiment first I guess. I can't seem to find the Wiki you mention. My google searches kept winding up at developer.vectorworks.net main page.
  14. Just speculating here, but could these be record definitions and not actual records. When you go to the data tab of say a symbol and there you find record definitions which can be associated/attached to the symbol by checking the adjacent box. When you search for records it will seek and find the ones attached objects and from there you can extract the stored data. But the definitions themselves contain no data other than their format and are stored in another place much like symbol definitions waiting to be copied and attached to some location on (or in) a layer.
  15. Has anyone got an example of a plugin which requires three points of input? Is there a means to limit the 2d path object to only three points of entry, without the user having to do double click termination? I wish to place posts along a straight line path and enter height during the placement. First point = origin / start point Second point = direction and distance(magnitude) Third point = height from one of the other points, preferably the origin
  16. I don't know much about the grade objects functionality, but with dimensions you utilize a dual dimension style, set the secondary units and suppress the display of the either the secondary or primary units. I've used this where both metric and inches were required in the document. Normally I'm only suppressing the secondary units; fractional inches require too many characters to communicate small values.
  17. Do you not require a single period or double period before the slash. Single period representing the current directory and double period meaning go up one directory level. Also is the mac platform freed from activating Unix escape sequences (like \n ) when utilizing back slashes? You might need \\ to break the escape sequence. I'm no guru when it comes to Unix but I just read about this potentially being a problem when scripting. Of course one cannot span drives when using relative paths; only the active drive is accessible.
  18. This would essentially be a Boolean parameter for PIOs which does not look like a check box. It could have two script loaded images (tool resources?) to display in the OIP to indicate the state of the button and return TRUE/FALSE. The same concept applied to a Radio Button parameter. Each choice having the ability of displaying one of two images (no text or radio button). Default image = non-selected, Alternate image = selected option. This could possibly lead to additional functionality of being able to select more than one option. This could be achieved by passing indices or Boolean flags back to the script. A PIO script can easily parse the result via a case statement. Once UTF-16 is fully implemented there maybe sufficient glyphs available that a button outline with text embedded will be able to convey the desired thought. The outline or background would alter to convey select state. Please ignore if this is in the current version. This office is using VW2013
  19. I certainly hope that the following is a non-starter. This concept of embeding functionality into a multi-purpose tool is a time waster. The ability to edit one's workspace environment is where this type of action is best addressed. Create a new palette for items that one perceives as functionally similar; drop items that your usage doesn't warrant access to, but please do not embed functionality into another selection tier that must be chosen before the tool can be accessed. Can you imagine having to select a pencil tool to draw something then a pull-down menu to choose between a line/circle/rectangle/double line/etc. where circle is the first and default selection because of alphabetical sorting of the pull-down. As it stands I am frustrated daily with the fastener tool which in VW2013 is the only means to draw structural bolts. The default is determined by a pull-down menu where the first item in the list (the default) is a socket head bolt (rarely if ever used in structural assemblies). Then you have to choose the corresponding structural nut. Which could have been a default because unless you are building a go-cart you would never mix non-structural with structural components.
  20. Actually I only need to temporarily store the revision value for display and manipulation in the PIO because the data for the script is retrieved from the record attached to the user editable titleblock symbol. I didn't want to hard code titleblock layouts into this PIO so I used a symbol to visually to that part. The PIO script is primarily for quality control and an interface through the OIP. (drawing file sheet name = titleblock sheet name, etc.) Hence my efforts to use the most relevant looking parameters to convey intent as well as functionality in the OIP. In this instance I have been hoping for an increment/decrement function with display of the current value in the OIP. The users eyes would not have to travel back to the titleblock to know they have the correct revision number after pressing an up or down arrow. A three value radio button is close to the concept. If only I could change the centre value on the fly so to speak. In a previous topic I was hoping for a two state button (boolean) that didn't appear as a check box. I went to learn about buttons but soon I realized I would rather not event enable simple things like titleblocks and parametric symbols when it is only to enable the interface and not the object, mainly because there are other aspects of event enabled PIOs that make managing the OIP challenging. My brain also started to hurt while I was trying to understand the logic behind having to call and create so many functions to enable a single event based button in the OIP.
  21. Thanks guys, You were both correct to some degree. I created a custom title block that has a revision number displayed among other things. I have wanted to control it so that only whole number increments in sequence would be entered. I am attempting to avoid using event based scenarios; just too much overhead for the desired task. So I was seeking to re-purpose a radio button parameter for the task. In my PIO field 'Revision' default choice index 1 there is a '+' sign index 2 there is the initial default revision number '00' index 3 there is a '-' sign When you save the revision number of the PIO instance back to the 'Revision' field it becomes stored even if it is not one of the selectable choices. So if I store 02 there no radio buttons will highlight in the OIP but the number remains stored and accessible until a button is again selected. If I can replace index 2 of the default choices temporarily with that number at the begining of the PIO script and back again at the end to 00 then the current revision number of the selected PIO instance will display and appear selected in the radio buttons. Pressing the radio button with the '+' is going to increment the revision field and correspondingly the '-' would decrease the revision number. I tried to use that NIL trick with SetRField but nothing changed. Perhaps because it is a radio button type field or perhaps because I'm in the PIO environment. I remember there being a difference between the definition and instance when working with symbol records which maybe my missing link here. I also would think that the function I'm searching for there needs to be a means to specify the choice index location in order to replace or store a new value, in this case at index 2. Like a corollary function to GetLocalizedPluginChoice which is used to retrieve those default values. Oh well I can always use a Static parameter to display the current revision number above the increment/decrement radio button. I'll have to find some sort of extended characters for the middle index like up and down arrows or an emdash that will be the stable setting.
  22. I know to get and reset the value of a PIO parameter instance using GetRField and SetRField but what is the route to rebuilding the "choices list" of a particular parameter field? I don't suppose it is unique to the PIO instance but probably a global to the PIO definition. Would GetObject and SetObjectVariableString be the route? There is no SetPluginChoice or SetCustomObjectChoice is there? Or do I just need a handle to the PIO definition and use SetRField? And is this separator for the entries in the choices list or is it indexed somehow? &div& Larry
  23. If you want drag/select and drop functionality then adapting the resources palette to your needs could be the focus. Click/select then click/place would be a tool palette adaptation. A callout is essentially an object; it can be wrapped into a plugin object for the former arrangement or a tool for the latter. I'm not sure how the former is done but one only need to look at the column plugins to know that it's possible.
  24. For those that have the landscape functionality, they can check the plugin's folder for files with names similar to the tools used to place or manipulate the plants. If plants similar to the arrangement used for steel shapes there will be a tab separated data files used to populate menus, pull downs etc. Even the string data should be retrievable for language adaptations.
×
×
  • Create New...