Jump to content

Yotarou

Member
  • Content Count

    18
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Yotarou

  • Rank
    Greenhorn

Personal Information

  • Occupation
    Engineer
  • Location
    Japan
  1. sorry, I made a mistake. objAng:= GetSymRot(objHdl); HRotate(textHdl, txtCntrX, txtCntrY, -objAng);
  2. The text can be kept the horizontal by the way below. objAng:= GetSymRot(objHdl); HRotate(textHdl, txtCntrX, txtCntr, -objAng);
  3. The origin can be reset by the script. procedure ResetVWOrigin; var x, y :real; begin GetOrigin(x, y); SetOrigin(-x, -y); end; Run(ResetVWOrigin);
  4. Is this useful for you? http://techboard.vectorworks.net/ubbthreads/ubbthreads.php?ubb=showflat&Main=17161&Number=77285#Post77285
  5. Hi Jeff, These are the test code that there is LinearPIO in PointPIO. Please draw PointPIO, after registering PointPIO to Tool Palette. LinearPIO need not be registered. << PointPIO: Point-Plug-in Object >> PIO-Parameters: LPIO_Name: {LPIO-Name = 'LinearPIO'} LPIO_Text: {LPIO-Text} ControlPoint01X, ControlPoint01Y: {LPIO-StartPoint} ControlPoint02X, ControlPoint02Y: {LPIO-EndPoint} procedure PointPIO; var h :handle; lng, rot :real; v :vector; begin Locus(0, 0); v.X:= pControlPoint02X - pControlPoint01X; v.Y:= pControlPoint02Y - pControlPoint01Y; lng:= Norm(v); rot:= Vec2Ang(v); h:= CreateCustomObject(pLPIO_Name, pControlPoint01X, pControlPoint01Y, rot); if h <> nil then begin SetRField(h, pLPIO_Name, 'LineLength', Num2Str(-1, lng)); SetRField(h, pLPIO_Name, 'MyText', pLPIO_Text); ResetObject(h); end; end;{PointPIO} Run(PointPIO); << LinearPIO: Lenear-Plug-in Object (in PointPIO) >> PIO-Parameters: MyText: {LPIO-Text} procedure LinearPIO; begin MoveTo(0, 0); LineTo(pLineLength, 0); TextOrigin(pLineLength/2, 0); TextJust(2); TextVerticalAlign(3); if pMy_Text <> '' then CreateText(pMy_Text); end;{LinearPIO} Run(LinearPIO);
  6. I think that it is searchable from NameList() and GetObject().
  7. I think He want to know the method of knowing the difference between "3D Top View" and "2D Plan". If a simple method exists, I too want to know.
  8. I found this Tips last week. procedure test_GetSObj; const SelectedObjects = 2; TraverseShallow = 0; EditableLayers = 4; var hSObj :handle; function DoObject(h:handle):boolean; begin hSObj:= h; DoObject:= true; end;{DoObject} begin{main} hSObj:= nil; ForEachObjectInLayer(DoObject, SelectedObjects, TraverseShallow, EditableLayers); if hSObj = nil then Message('object = none') else Message('object type = ', GetType(hSObj)); end; Run(test_GetSObj);
  9. Try SelectObj((T=PlugInObject) & (R IN ['Chain Dimension'])); T: object type(= plug-in object) R: record's name(= 'Chain Dimension') Record's name has the possibility that is not "Chain Dimension" . Because I am VW11.5 user, I am not confirming it in VW12.5.
  10. Hi Grant, If you don't click on the screen, the plug-in tool cannot be executed. The plug-in menu is more appropriate.
  11. Try, procedure test; {$ DEBUG} var x, y, z :real; h :handle; begin h:= FActLayer; Layer('3d Loci'); while h <> nil do begin Get3DCntr( h, x, y, z); Locus3D(x, y, z); h:= NextObj(h); end; end; Run(test);
  12. Yotarou

    linelength

    Hi, Length and the angle of the line are examined by "HLength" and "HAngle".
  13. Try- criteria:= Concat('S=', '''', symbolName, ''''); if Count(criteria) = 0 then begin h:= GetObject(symbolName); if h <> nil then begin DelObject(h); end; end;
  14. Yotarou

    closed poly

    It's impossible. However, the "Closed" function can be made. function Closed(hPoly: handle): boolean; var fPat:integer; begin fPat:= GetFPat(hPoly); SetFPat(hPoly, 0); if HArea(hPoly) = 0 then Closed:= false else Closed:= true; SetFPat(hPoly, fPat); end; {Closed} In most cases, this is faster than the "IsPolyClosed" function.
  15. Yotarou

    closed poly

    Hi, Please see "VWPluginLibraryRoutines.p" in "Plug-ins" folder. There must be "IsPolyClosed" there. Function "IsPolyClosed" can be used in your script when existing.

 

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.

×
×
  • Create New...