Jump to content

Hippocode

Member
  • Posts

    796
  • Joined

  • Last visited

Everything posted by Hippocode

  1. Hey, I'm trying to create a PIO that can be changed by the mouse once its created. For example the basic rectangle. Once the object is created it is possible to pick up one of the corners and move it. I can't get that to work on PIO's with polylines,rectangles etc etc.. How does one do that ?
  2. I've made a simple script to create my own polygon with an assigned name. PROCEDURE Example; VAR Xstart, Ystart, Xnext, Ynext, Xprev, Yprev :REAL; request1,request2,result1,result2,RuimteNaam,RuimteNummer:STRING; name: STRING; BEGIN RuimteNaam := PSPACENAME; RuimteNummer := PSPACENUMBER; {Closepoly;} Beginpoly; Message('Pick FIRST point...'); { SELECT FIRST POINT } GetPt(Xstart, Ystart); AddPoint(Xstart,Ystart); { PREVIOUS POINT } Xprev:=Xstart; Yprev :=Ystart; { DRAW NEXT POINTS } { DO WHILE NEXT POINT /= FIRST POINT } WHILE((Xnext <> Xstart) OR (Ynext <> Ystart)) DO BEGIN { NEW POINT } Message('Pick NEXT point...'); GetPt(Xnext, Ynext); { STOP IF NEW POINT IS PREVIOUS POINT (doubleclick) } IF((Xnext=Xprev) AND (Ynext=Yprev )) THEN BEGIN Xnext:=Xstart; Ynext:=Ystart; AddPoint(Xstart,Ystart); END { NEW POINT } ELSE BEGIN MoveTo(Xprev,Yprev ); AddPoint(Xnext,Ynext); {RESET PREVIOUS POINT } Xprev:=Xnext; Yprev :=Ynext; END; END; Endpoly; {Add Text} {HCenter(h,x,y);} request1 := 'Geef het lokaalnummer in:'; request2 := 'Geef de ruimtenaam in:'; result1:=StrDialog(request1,RuimteNummer); result2:=StrDialog(request2,RuimteNaam); name:=concat(result1,': ',result2); SetName(LNewObj,name); END; RUN(Example); For more functionality I tried making a PIO from the script, using a 2d path object type PIO. IT doesn't work as a PIO so I4m missing something ? I can draw the lines and the object gets created, still the object itself is invisible but can be snapped on..
  3. In order to make a custom procedure that uses input its possible to add variables in the header. They don't need to return the values itself so I don't use VAR PROCEDURE blablabla(a,b:STRING); Begin custom code End; calling this procedure in my script: blablabla(text1,text2); All of this works great, untill I try to add another type of paramater in my header. I've tried various combinations like (a,b:STRING; c,d:INTEGER) but I can't manage to get it done. Is this even possible ?
  4. Hey, I've made several PIOs now where I add standard values to use. After a while I change these default values to something else but it keeps using the old default values. Restarting vectorworks doesn't change anything, nor removing/readding the object to my workspace. Do I have to delete/rebuild the whole parameter each time I want to change the default value in the parameter setup itself ?
  5. That seems to work. L=$A2 for example works if I remove the '' in A2. Adding L= to the string is what I did wrong Thanks
  6. Won't work. Making one cell with the whole databasestring in and pointing the db criteria to that cell won't work either.
  7. I have a spreadsheet that shows some objects in a particular layer. Is it possible to link parts of the database selection critera to cells ? =DATABASE((INSYMBOL & INOBJECT & (L='niv +1 elektriciteit') & (T=SYMBOL) & (R IN ['TDE_00 algemeen']) & (NOT (R IN ['TDE_72 verlichting'])) & (NOT (R IN ['TDE_71 schakelaars'])) & (R IN ['TDE_70 elektriciteit']))) Changing (L='niv +1 elektriciteit') to L=A1 or 'A1' with A1 containing the layer name does not work. Any workaround for this ?
  8. Windows 7 64 bit vectorworks 2010
  9. Hey, I've got the following problems and I think they are related to the memory. I do have a fresh new good desktop so I don't understand this can happen to vectorworks 2010. => I can't copy/paste anything anymore => Any image in any drawing will become a grey box My co-workers have older desktops and also have the copy problem once in a while, but it just seems random on small files, big files... Havn't had it for weeks now, but its back. Restarting doesn't fix it. Any way around/to fix this
  10. That works perfect. Though I did have problems retrieving the values at first, the script didn't recognize the field values as integers(parameter setup) but as text instead. str2Num etc saved me
  11. Hey, I'm using a script to number certain symbols (A1,A2,A3). This is done by adding the right name in a popup which will be assigned to the selected symbol(s). It would be nice to show the previous name + 1 as default in the popup for the next symbols.... I havn't found a way to alter the default value in the same script. The best way around that I know would be to make a custom special symbol just to hold the name in a Rfield and retrieve/change it each time ? XML also looks like an option, but I'd need to reset it for each new drawing..
  12. I've added 2 screenshots before and after showing what I'm talking about. I guess its a sort of setting doing this, because I don't have it with all the layers, then again I can't find the logic in it
  13. Windows 7 and VW 2010. I'm always using saved views so whatever I draw won't affect the basic plan I'm working on. I've added a file to this reply. Use the saved view to go to niv +1 elektriciteit. Edit the symbol placed symbol and leave editing mode The Layer niv +1 which is grayed out will dislocate. Using the saved view to go to layer niv+1 and go back to niv +1 elektriciteit will fix it.. While deleting a lot of symbols and layers to make this file under 5mb I noticed that when I deleted the layer "koppel" the layer +1 won't dislocate anymore when editing that symbol, why and how I have no idea
  14. Hi, The problem starts when leaving the edit mode of a symbol. Doesn't matter if it's 2D,3D or a combination. Once out of the edit mode, a part(some layers) of my drawing get dislocated. On the view options in the menu bar I'm still on "top/plan" and reclicking that doesn't change anything. I have to add that I'm using saved views, and in the current saved view LAYER x gets dislocated, while te current active layer looks ok. Pressing 0 has no effect either. Going into the dislocated layer manually fixes the view issue. But having to do that after each symbol edit is a pain in the ass. I often forget about it and notice it too late when I've been placing symbols in 3D instead of 2D and all my work can go to the trashbin What am I doing wrong here ?
  15. That seems to work indeed. Is there a way to change the DATA name variable of a polyline trough vectorscript ?
  16. This has been the same for many versions. Although I haven't investigated to see if setting "location" objects in layer planes matters. I'll post an example in VW2012. Let me know if you need it in another version. Basically naming a polygon, polyline, rectangle, circle, oval etc in the OIP Data Tab makes it behave like a location. That location information is available as a database criterion, but NOT as a database function. (would that it were.....) I've never been able to get a space object to behave as a location. I'm pretty sure it's not possible. (would that it were....) example attached mk I'm using VW 2010, would u mind ? From what I've read we just could make our own polygon PIO instead of the custom space. This would make it easier to sort all placed symbols by the custom space and we won't mix up normal polygons/objects with the ones the PIO generates.. Has anyone done this yet before I start breaking my head on it ? Too bad the basic scripts are locked, would be copy-pasting the normal polygon tool and adding some variables and printed text
  17. Any updates on this ? Is there a decent workaround for this (btw how exactly did u make it work with the polygon ?) or has it changed for newer versions of VW ?
  18. cm or m isn't displayed in the text, just the number so its not about a char less or more. When I switch units the text will change Y-status as if the textorigin coordinates get messed up
  19. Is it also possible to load the unit settings into a worksheet so I can change the unit choice in my worksheet, whatever the setting in the drawing might be ? Example: I have a list of objects in a worksheet, I want them always to give dimensions in "m" w/e the document has set up. document could be mm,cm,....
  20. Vectorworks' standard plugin objects update the dimensions ( lets say length and height ) when we choose another unit setting in the documents setup. This way, instead of 100cm it will be 1m When drawing an object lets say a rectangle(x1,y1,x2,y2) i have text attached to it, lets say in the mid textorigin(x2/2,y2/2) For some reason, the text moves abit around when changing the units from cm to m in the documents setup. How do I fix this
  21. The Descending and Ascending Sort function in the worksheet are nice but don't work properly on numbers placed in a text field. A lot of PIOS use a number to trace them, ideal to list them in a worksheet. Sadly, that number is stored as a string and won't sort properly Sorting will give the following: 1 10 11 2 21 22 3 4 5 6 7 8 9 Is there any way to sort them the right way and not tread them as if they were strings ??
  22. I guess its all about the " Alternate Name" in the parameters setup. Too bad I can't find the script space in the plugin list I did find the fieldname by accident, but is there a way to list the fieldnames of each property of a plugin object/tool ?
  23. From what I know, each object has an asigned record where the data is stored. This way, in a database record we can retrieve data this way: objectname.fieldname This works for most fieldnames, but not for all. Is this because the fieldnames are language based so we need the real variable name ? If so, where do we get them ? For example Object space: space.length gives me the length of the space. space.'ceiling height' doesn't return anything Both length as ceiling height are parameters in the shape pallette of the object "space"..
  24. The select similar tool is different as it will select ALL possible symbols when clicking on one. The tool I made will only select the "kind" of symbols I select. If I want to change All my lights named L1, I just need to click one and the script will select all placed L1 symbols in the layer. Select similar tool would select all symbols instead. If not, i'm a fool. (edit: never noticed the tool properties could be changed. Thus i'm a fool lol, good practice though.) As a sidenote I ran into another problem. when trying to select the basic objects ( text, line ) the command doesn't respond, even if the string is right. t_temp:=concat(BNames[j]); {this returns Text} UprString(t_temp); {make it TEXT} test:=concat('T=',t_temp); {create T=TEXT to select all text objects} SelectObj((test)); {no text gets selected ?}
×
×
  • Create New...