Jump to content

Alexandre Villares

  • Content Count

  • Joined

  • Last visited

Everything posted by Alexandre Villares

  1. Alexandre Villares

    Duplicate Symbol Definition

    I would like to make a copy of a Symbol Definition, in order to modify it later creating a variation of the original one... I can create a new symbol and inside it convert to group and ungroup an instance of the original one. This sort of works, but it's not very elegant and, unless I add some code, it won't do for 2D/3D Symbols: CopySymbol won't help because it must bring the SD from another document. Any better ideas? rgds,A
  2. Alexandre Villares

    So....what HAS changed in 2008?

    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);
  3. Alexandre Villares

    Please don't kill Cut 3D Section yet!

    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
  4. Alexandre Villares

    Moving Workspaces From Mac To Windows

    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 )
  5. Alexandre Villares

    Single Click Tools

    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
  6. Alexandre Villares

    12.0.1 Walls & Classes

    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 ]
  7. 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
  8. Alexandre Villares

    basic question

    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
  9. Alexandre Villares

    keydown delima

    Maybe you could check for double-click (P1=P2) to terminate instead? regards, Alexandre
  10. Alexandre Villares

    Linear PIO: rotation value

    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 ]
  11. Alexandre Villares

    Dimensions in different units in different layers?

    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
  12. Alexandre Villares

    X and Y coordinates

    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 ]
  13. Alexandre Villares

    Double polys and lines

    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
  14. Alexandre Villares

    floor slab textures for medels

    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
  15. Alexandre Villares

    X and Y coordinates

    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 ]
  16. Alexandre Villares

    Scale-independent plug-in objects

    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 ]
  17. Alexandre Villares

    Linear PIO: rotation value

    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]
  18. Alexandre Villares

    $include error: "Could not open INCLUDE file"

    Try removing 'd:/' and puting your test include file inside the Plug-ins Folder inside your VectorWorks application folder. HTH
  19. Alexandre Villares

    Purpose of rectangles

    Rectangles have a center snap/constraint, rectangular polys don't.
  20. Alexandre Villares

    Text Size

    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
  21. Alexandre Villares

    Modern Dialog Image Resources - Again!

    Great addition! Thanks a lot Jeff! best regards, Alexandre
  22. Alexandre Villares

    Modern Dialog Image Resources - Again!

    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. Alexandre Villares

    Modern Dialog Image Resources - Again!

    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.
  24. Alexandre Villares

    Documentation-Event Handling Scripts

    I saw some example scripts at the VectorScript-List. Mail me and I?ll send you a copy ifyou want. rgrds, Alexandre
  25. Alexandre Villares

    Tapered Extrude trouble

    code: Procedure Test; VAR H:HANDLE; BEGIN Rect(0,0,100m,100m); H:=CreateTaperedExtrude(LNewObj, 0, 100m); END; Run(Test);[/code] Can anyone tell me why this code draws a Tapered Extrude 0,10m (10cm) thick instead of 100m thick? It seems to always draw it 1000 times smaller, did I do something wrong? [ 02-07-2005, 03:00 PM: Message edited by: Alexandre B A Villares ]


7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114


© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.