+ Reply to Thread
Results 1 to 6 of 6

Thread: rs.Command("_Dim .............") bug

  1. #1

    rs.Command("_Dim .............") bug

    Hi Steve
    In the attached file there is an example of strange error with rs.Command("_Dim "+str(stp4)+" "+str(stpqx)+" V "+str(stpmY)).
    The Command History is OK:
    seleziona profilo: _Dim
    First dimension point ( Style=Dim5 Object Continue=No ): 8.36167107854816,91.9241419709027,0
    Second dimension point: 8.36167107854816,-114.549874813767,0
    Dimension location ( Vertical Horizontal ): V
    Dimension location: -16.6383289214518,-11.3128664214322,0
    seleziona lato da modificare <Enter per terminare>:

    but the result don't respect the coordinates like in the attached 3dm file.

    the result dimension is 53.29 instead of 206.47
    if i repeat the script the dimension size changes continuously.
    Ciao Vittorio

    Ciao Vittorio
    Attached Files

  2. #2
    Senior Member Steve Baer's Avatar
    Join Date
    Apr 2010
    Location
    Seattle
    Posts
    1,472
    Blog Entries
    19
    Hi Vittorio,
    Does this have to do with python or is the dim itself working incorrectly?

  3. #3
    Hi Steve
    The problem is with Python only. Dim workinh correctly. If you want i send to you the script.
    Ciao Vittorio

  4. #4
    Senior Member Steve Baer's Avatar
    Join Date
    Apr 2010
    Location
    Seattle
    Posts
    1,472
    Blog Entries
    19
    Yes please send me the script since I can't quite figure out what the problem is.
    Thanks,
    -Steve

  5. #5
    up.thanks..

  6. #6
    Hi,
    I don't have Rhino 5 installed on this machine, so I can check nothing of this but:
    As far as I remember, converting a point-coordinate-list to a string via str() will put brackets [] at both ends of the string, which you have to get rid of for the Command to work.
    But anyway, I think something like AddDimension()/AddAlignedDimension() has been added to the rhinoscriptsyntax, but is kind of hidden, as it does not appear in the helpfile. It works however and I think you can use the Rhino VBScript help as a reference to see what parameters the function needs in what order. So there's actuelly no need for the Commandline hassle anymore.
    Probably Steve could update the Python helpfile to include this?

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts