Jump to content

Alexandre Villares

Member
  • Posts

    253
  • Joined

  • Last visited

Everything posted by Alexandre Villares

  1. Sorry for the cross-posting... I'm using an image in a dialog, it stopped showing on VW 12.5 & 2008 on Windows. Previously, resource file extension changes broke my scripts on the PC, now I think it might be something similar. On the Mac, works fine. {...} CONST kResourceFile='myimage'; {on Windows that gets myimage.qtr file inside the Plug-ins folder} {...further down...} gOKdlog := SetVSResourceFile(kResourceFile); gDlogID := Define_Dialog; IF gOKdlog & VerifyLayout(gDlogID) THEN gDlogResult := RunLayoutDialog(gDlogID,Drive_Dialog); {...inside the dialog code...} CreateControl(dialogID, 2, 1, kResourceFile, 1010);
  2. Hi Yopera, From VectorWorks 11.5 onwards you can develop workspaces on the Mac, rename them something.rsrc and use Flattener to create the equivalent PC workspace - You'll have to open it on the PC and fix palette positions. (Flattener: http://www.nemetschek.net/support/custom/vscript/vstool.php )
  3. Hi GJ, I suffered from the same frustration. I've made the tools at the VectorPlug-ins site, the layer changing ones need the dreaded 'click at the drawing'. SDK programming can do it, as you will see in the free (but Mac only) tools by Manuel Paredes at www.vectorbits.com regards, Alexandre
  4. Hi Chris! This is exactly what I think. Class & class attributes for each component! (otherwise you 'kill' the great viewport class attributes edit feature for styled walls) [ 02-17-2006, 10:51 AM: Message edited by: Alexandre B A Villares ]
  5. Wall Style component attributes override class attributes - this kills VW12 new edit viewport class attributes feature for walls. Say you want to show walls in black in one viewport, and the same walls in red in the other. On VW12 (with un-styled classed walls) you can! Great! - Now if you use wall styles you just can't. Frustration. I wish wall style component attributes could be 'by (chosen) class' - this would fix it. regards, Alexandre
  6. Hi help_arch, Unfortunately I think there is no VectorScript way of changing the default line thickness (those at the Attributes palette). Those are VectorWorks settings (in oposition to document settings) inacessible through VectorScript. []s Alexandre
  7. Maybe you could check for double-click (P1=P2) to terminate instead? regards, Alexandre
  8. Cut 3D Section command was taken out of the new standard (designer/architect) workspaces. At the Workspace Editor one can see it was assigned to the Legacy category. I believe this move shows NNA intention to remove the command on newer versions of VectorWorks and I think they must believe that Section ViewPorts make Cut 2D/3D Section commands obsolete. I beg to disagree. There is no way to achieve certain results (isometric sections, section study models) without using Cut 2D & 3D Section commands. Section Viewports are great but they do not (yet) replace completly the Cut 2D & 3D section commands (specially the Cut 3D Section) for certain uses. Please NNA, don't take away those commands from your users! Alexandre Villares
  9. Hi, After the user flipped the object using the mirror tool IsObjectFlipped will return TRUE and your code should counter-act it (the result is a flipped object as expected by the user). Then if the user reshapes the line, the PIO is 'magically' unflipped, and your code gets back to the normal mode (and no one should notice the difference). But again, I can't remember if I coded for the over/under the line difference. My sample code acts differently acording to angles in certain quadrants, and a manual OIP pFlip parameter to override it (that's the 'f' flag). IsObjectFlipped will be dealt by the 'f2' flag (to set Text Vertical Alignment and Y origin position) and will also invert LRot angle (LROt:=-LROt). This is the critical stuff. [ 09-08-2005, 01:58 PM: Message edited by: Alexandre B A Villares ]
  10. Hi Mike, You can have two dimension units. 'Gringos' ;-) use this to show inches and centimeters side by side, but you can use this to your own purposes: Create a custom dimension (document preferences > dimensions > custom) and set the dual view to primary or secondary. At the Units panel, set the primary dimension objects and secondary... Now you can change dimension objects at the Obj. Info. palette to show either kind of units. HTH, Alexandre
  11. Hi islandmon, I think I don't understand exactly what you want to do. My example should work as a plug-in object, it shouldn't use MouseDown, and it should be set to regenerate (redraw) when moved, so retrieving it's own new position. The text inside de object should be set using it's internal coordinate system, that is 0,0 like my earlier exemple. I didn't run your code yet but I think you must be running it as a tool. That's a very different approach. To run as a tool, you should not use the GetCustomObjectInfo and would draw free standing text objects using the drawing coordinates, perhaps on the MouseDown position... [ 09-08-2005, 01:25 PM: Message edited by: Alexandre B A Villares ]
  12. quote: Originally posted by Bruce Pittard: How about an option when creating double polygons or double lines if they kept their information so the width, cavities etc can be modified in the object info. This would be very handy with variations. Hi, Why not use walls instead? They have exactly this property you described. []s Alexandre
  13. Now I made myself a Floor substitute / Slab Object with 3 classes (top, bottom and sides). It can be made of polylines with holes. http://www.vectorplugins.com regards, Alexadre
  14. Hi, A VectorScript recipe for you... - Go to Organise > Scripts > Create Plug-in... - Press 'New...', give it a name, choose 'Point Object' and press 'OK'. - Press 'Proprieties' and check 'Reset on Move' and 'Reset on Rotate'. - Now press 'Script...' and paste this: code: PROCEDURE XYText; VAR objectHand, recordHand, wallHand : HANDLE; objectName : STRING; X, Y : REAL; BEGIN IF GetCustomObjectInfo(objectName, objectHand, recordHand, wallHand) THEN BEGIN {Get Object info} SetObjectVariableBoolean (objectHand,800,TRUE); {Let the text style be changed by the user from outside} GetSymLoc(objectHand, X, Y); {Get Object Position} END; Lous(0,0); {Something to see, won't print} TextOrigin (0,0); {Set text position, note the object internal coordinate system)} FillPat(0); {Set Fill to None} BeginText; Concat('(',Num2StrF(X),')(',Num2StrF(Y),')' ) {Note there is no ; at the end of this line} EndText; END; RUN (XYText);[/code] Then you have to add it to your workspace (File > Workspace Editor), choose 'Edit a copy' and at the 'Tool' tab you'll find it under the 'Miscellaneus' category. [ 06-07-2005, 10:01 AM: Message edited by: Alexandre B A Villares ]
  15. It took me years to perfect this code: code: {******* non-scaling PIO code starts here ***************} ALHand:=ActLayer; IF GetCustomObjectInfo(objectName, objectHand, recordHand, wallHand) & GetLayer(objectHand)<>NIL THEN Layer(GetLName(GetLayer(objectHand))); mm:=GetLScale(ActLayer)*GetPrefReal(152)/25.4; {******************************************************************************************} { Your code will go here, this poly is an example } ClosePoly; Poly( -5*mm,1*mm, 0,6*mm, 5*mm,1*mm); {****************************************************************************************} Layer(GetLName(ALHand)); {this temp. active layer change is necessary to avoid text size problems if the PIO is redrawn when not in the active layer, and the active layer has a different scale} {****************************************************************************************}[/code] [ 05-15-2005, 09:29 PM: Message edited by: Alexandre B A Villares ]
  16. You should test for IsObjectFlipped() otherwise you get strange behavior if the user uses the mirror tool on your PIO. code: {--- some old code chunk I've found as example----} LRot:=GetSymRot(objectHand); f:=1; IF (LRot >#90d) THEN f:=-f; IF (LRot <-#90d) AND (LRot >(-#180d)) THEN f:=-f; IF PFLIP THEN f:=-f; IF f=1 THEN TextJust(1) ELSE TextJust(3); Ltexto:= PLineOffset*mm; f2:=1; IF IsObjectFlipped(objectHand) THEN BEGIN LRot:=-LRot; f2:=-f2; END; IF PTEXTO1<>'' THEN BEGIN TextVerticalAlign(3+(2*f2)); TextOrigin(PLineLength+PLineOffset*mm*f,0.5*mm*f2); TextSize(Str2Num(PC1)); BeginText; PTEXTO1 EndText; Ltexto:=HWidth(LNewObj)+PLineOffset*mm; END; MoveTo(PLineLength,0); LineTo(PLineLength+(Ltexto*f),0); RotatePoint(PLineLength,0, -LRot); [/code]
  17. Try removing 'd:/' and puting your test include file inside the Plug-ins Folder inside your VectorWorks application folder. HTH
  18. Rectangles have a center snap/constraint, rectangular polys don't.
  19. Hi, I'm not sure this is relevant in this case... but as I've done some 'scale independent' PIOs I noticed that on special ocasions they can regenerate while not being at the active layer, making the text size go wrong. So I have added some code before and after the drawing procedures that make the parent layer (if found) temporarily active. rgrds, Alexandre
  20. Great addition! Thanks a lot Jeff! best regards, Alexandre
  21. Makes me want to scream of joy and anger. It finally worked. I had to boot a Mac on OS 9 and copy the file into a USB pendrive. Mac OS 9 puts the resource fork part of the file on an invisible folder (instead of Mac OS X ._file) and this one when renamed worked OK.
  22. I?ve created a resource file with the images I want on ResEdit on the Mac and it works OK on my dialog script on the Mac, but it is not working on the PC. I?ve tried to isolate the resource fork part of the file and I have renamed the extension .rsr for the PC. Please Help! I?ve tried to get the resource fork from a networked PC HardDisk, and also tried emailing it and dowloanding at the PC. Tried a USB pendrive also. None of my Macs have floppy disks anymore so I wasn?t able to do the ancient drill of saving it on a PC formated disk. Very frustrating!
  23. I saw some example scripts at the VectorScript-List. Mail me and I?ll send you a copy ifyou want. rgrds, Alexandre
  24. quote: Originally posted by ccroft: Do you get the same type of thing if the angle is other than zero? Hi Charles, Yes, any angle. I have to test it again on VW11, now on VW10 for some reason the code posted produces an ungrouped Tapered Extrude, 6 NURBs surfaces! It's driving me crazy!
  25. Hi kiwi, Maybe my wording was not very clear (I have even edited the post now). Tapered Extrude is plan/view independent You have to rotate it afterwards if you want it sideways. The document is set to meters and I put 'm' after the 100 real-type paramenter... It looks like a bug to me. [ 02-07-2005, 06:11 PM: Message edited by: Alexandre B A Villares ]
×
×
  • Create New...