Jump to content

hong

Member
  • Posts

    127
  • Joined

  • Last visited

Posts posted by hong

  1. After testing few, I realize this script is working properly and the problem was to recognize a picked object. In a drawing that has some complexity, 'Getpt (x, y); h:=pickobject(x,y);' routine seems to recogize something even though I clicked in blank space.

  2. I made up a tool that writes a field value if it sees a record attached to a picked object. When the tool is activated, I have to select an object on screen to see whether that object has the record. If so, then it draws a tag with a field value. This was the idea and it works for the first picked object. However, when I select the next one (VW maintains selected tool until other tool is selected), it skips this checking process and just draws a tag. Am I missing something?

  3. Check your default text of each field that linked to symbol.

    Default text is the text shown at the time when you link to a symbol. When you are in edit mode, changing text doesn't mean that you are changine default text.

  4. Well, I tested 'IsNew' upfront and it didn't work.

    For some reason, I see my script running twice. I was inserting 'Alrtdialog' in few places to check the value of 'p2x' above. When I ran the script, first it showed the given default value of paramater 'linelength' and second time it showed the value of linelength that was drawn at the execution of script. This seems to be why 'IsNew' doesn't take the value drawn. It always takes the default value because first instance always takes default.

  5. Start to make a little bit of sense. Thanks Raymond.

    However, I am still suspicious of this 'IsNewCustomObject(objectname)' statement. I did copy script variables from pParameter and when these variables are called after the 'IsNewCustomObject', they go back to default value of pParameter instead of the scrpit variables which stores current values. I am thinking, as you suggested, that the statement itself seems to be calling pParameter by nature. p2x and p2y below takes default value of linelength and boxwidth.

    Begin

    result:=GetCustomObjectInfo(objname, oh, rh, wh);

    If result then

    begin

    boxW:= PBOXWIDTH;

    boxL := PLINELENGTH;

    p1x:=0;

    p1y:=(-boxW/2);

    p2x:=boxL;

    p2y:=(boxW/2);

    x:=Pcontrolpoint01X;

    y:=Pcontrolpoint01Y;

    PenSize(14);

    PenPat(-2);

    RRect(p1x,p1y,p2x,p2y,Pradius,pradius);

    Rang:=GetSymRot(oh);

    Drawtext;

    Moveto(x,y);

    Lineto(p2x,p2y-(pradius/2));

    If IsNewCustomObject(objname) then

    begin

    SetRfield(oh, Getname(rh), 'CONTROLPOINT01X', Num2StrF(p2x));

    SetRfield(oh, Getname(rh), 'CONTROLPOINT01Y', Num2StrF(p2y));

    end;

    end;

    End;

  6. Thanks for your reply.

    I am using a rectanglar pio with one control point. RR is drawn by linelength and boxwidth and resizable afterward by selection handles. A control point will be inserted at the same time in an assigned location.

    This location of control point is relative to the size of Rounded Rectangle when first inserted. In other word, it depends on the values of 'linelength' and 'boxwidth' initially. After first insertion, It can be dragged to a new position.

    When I used 'SetRfield' for the control point record field, this sets the point permanently as you know unless I move RR and then it rewrites this value according to new linelength and boxwidth.

    Following Alex's suggestion, I tested to use 'If IsNewCustomObject then' in order to set an initial value of control point. Interestingly, the readings from 'linelength' and 'boxwidth' doesn't go under this statement. I can assgin a numerical value such as '20"' but the parameter values such as 'linelength' and 'boxwidth' will not return to 'SetRfiled' after 'if IsNewCustomObject'.

  7. Thanks for your replay.

    What I am trying to create is a detail marker which doesn't come with VW. This marker consists of one rounded rectangle and a tag which should be able to move around outside of rectangle with a line that connects to the rectangle. (this part is similiar to space tool).

    Now I can make my PIO to draw rectangle and write a tag starting from a control point so that it can be moved around after pio insertion. But I can not set the initial location of control point. Let say I want it be top right hand corner of rectangle. When I insert this pio, the control point alwary locates the first clicked point. When I use 'serRfiled', the control point goes to whereever I assign to but I can not move it anymore.

    If I resove this as you suggest with 'Isnewcustomobject', my next question is how to get a point along my rectange near to the tag (control point if I make it work) in order to draw a line. I was testing 'getclosetpt', but this one only, I think, recognizes a vertice not any point.

  8. O.K. I am writing a script for a plug-in object with a control point in it. I can move a control point by 'SetRfield' to the place where I want when the script is executed. However this control point is locked, that is I can not drag around anymore. Is there a way to release this?

    What I am trying to do is somewhat similiar to the tag in 'space' tool.

  9. Is there a way to make this gray darker?

    'Grey other layers' is a good option to make contrast between, let's say', existing to new construction. However when to print, grayed background seems to be too light and I am wondering if there is a setting to make it darker without using layer color assigned. If I assign a layer color to darker gray in document setting, it doesn't change hatches.

  10. Yes, perspective picture plane becomes a resizable viewport boundary. However it enlarges again. Let's say I am setting up a perspective view from a living room to dinning room. When I create a viewport after 'set 3D view' command, my view is way way a far from building itself because the picture plane(viewport crop) was become too big in relation to the specific view that I was viewing in model layer.

  11. What would be the best way to set up a perspective view on viewport? I tried to set up a view in a design layer and use a rectangle for crop boundary to viewport. When I created a viewport this way, the crop boundary enlarged in sheet layer to include entire model not the specific view that I set up in design layer. Am I missing something?

  12. I experienced the same thing. Even though it looks fine when you zoom in, I beg the length of that text block is far far away from the starting point. And this causes the text appearing very long when zoom out. You can mannually readjust the length by click and dragging the triangle at the end of text block until they(VW) fix this bug.

  13. Well, you seem to be in trouble. We use OS X server where we could mannually force a file to be read/write. Mark as "in use" status somehow has to do with read only status of a file in OS X, but I am not sure on OS 9. You might try to copy this file to somewhere else and retry to open or workgroup reference. If the file is truly open, it shouldn' allow you to copy from finder because it is 'in use.'

  14. Only way that I know to recover a file is to workgroup reference that file into a blank new file and copy in the corrupted file. This can be done by clicking a button when you detach a workgroup reference file. You will be asked whether you want to copy the file. In this case, you can only save all the model layers, not the sheet layers because you can not workgroup reference a sheet layer as far as I know.

  15. To be clear, you can import a whole folder of dwgs into one vectorworks file in VW11. If these dwgs are xreferenced each other correctly, yes they will show up as it is in this one VW file as different layers. I don't think VW11 will automatically trigger to import all xrefs by just importing one file that has xrefs.

×
×
  • Create New...