Kubotek Forum

KeyCreator & KeyCreator Viewer Technical discussion of CAD/CAM and integrated partner products
Kubotek Forum > KeyCreator & KeyCreator Viewer > Dimension scaling in model mode View modes: 
User avatar
Advanced member
Advanced member
Hans_Winkler - 9/3/2021 11:58:32 AM
   
Dimension scaling in model mode
Hi All,
I don't do a lot of detailing in KeyCreator. When I do, I do it in model mode.
Back in the Cadkey days, there was a command to simply select a bunch of dimensions with a new scale factor, done.
Here is my question (remember I'm doing this in MODEL mode):
1) Is it still possible to select multiple dimensions and change their scale factor?
2) I'm unable to do this via KXL, at least I haven't found the information, if it does exist. Is this possible in KXL? (somebody at Kubotek may have the answer)

Thank you for any help!
Hans

Here is KXL code, that doesn't change the dimension scale, I thought USERSCALE is the ticket, but it doesn't seem to change anything!


:GETDIM
    HENTITY hEnt
    INT intElement
    MASKENTITY 0, 11, 12, 13, 14, 15, 16, 17

    GENSEL "Select Dimensions to be scaled...ESC to Quit...F10 to Backup", intElement
    if (@key == -3)
        EXIT
    if (@key == -2)
        EXIT
    

    INT intQuant = 0
    
:ENTITIES
    if ((intQuant = intQuant + 1) > intElement)
         goto DONE

    GETNEXT , hEnt


    GetDetailAttr hEnt, ARR1STYLE, nStyle1, ARR2STYLE, nStyle2, USERSCALE, nUserscale
    nStyle1 = 1
    nStyle2 = 7
    nUserscale = 2
    SetDetailAttr hEnt, ARR1STYLE, nStyle1, ARR2STYLE, nStyle2, USERSCALE, nUserscale
    RefreshDimension hEnt

    goto ENTITIES

:DONE
    //DetailOptionsPrimaryUnits
    NoteState

User avatar
Advanced member
Advanced member
Hans_Winkler - 9/3/2021 12:37:53 PM
   
RE:Dimension scaling in model mode
I figured it out via KXL, had one parameter missing!

    DOUBLE dNewScale
    if (dNewScale <= 0)
        dNewScale = .5

    goto GETDIM

:SETNEWSCALE
    GetDbl "Enter new dimension scale factor...ESC or F10 to Quit" , dNewScale, dNewScale
    if (@key == -3)
        EXIT
    if (@key == -2)
        EXIT

    if (dNewScale <=0)
        MessageBox "The scale factor has to be bigger then Zero.\nTry again", 0
    if (dNewScale <=0)
        dNewScale = 1
    if (dNewScale <=0)
        goto SETNEWSCALE

:GETDIM
    HENTITY hEnt
    INT intElement
    MASKENTITY 0, 11, 12, 13, 14, 15, 16, 17
    STRING $sPrompt = ""
    SPRINT $sPrompt, "Select Dimensions (scale set to %f); ESC to Quit; F10 New Scale", dNewScale

    GENSEL $sPrompt, intElement
    if (@key == -3)
        EXIT
    if (@key == -2)
        goto SETNEWSCALE
    

    INT intQuant = 0
    
:ENTITIES
    if ((intQuant = intQuant + 1) > intElement)
         goto DONE

    GETNEXT , hEnt


    GetDetailAttr hEnt, USERSCALE, nUserscale, DIMUNIT, nDimunit
    nUserscale = dNewScale
    nDimunit = 0
    SetDetailAttr hEnt, USERSCALE, nUserscale, DIMUNIT, nDimunit
    RefreshDimension hEnt

    goto ENTITIES

:DONE
    NoteState

User avatar
Advanced member
Advanced member
Dana - 9/7/2021 11:09:21 AM
   
RE:Dimension scaling in model mode

You can do it without kxl... detail-change, select the dims, then go to the "primary units" page, change units to "user", then you can change the scale.


User avatar
Advanced member
Advanced member
Hans_Winkler - 9/7/2021 12:22:25 PM
   
RE:Dimension scaling in model mode
Thanks for the tip!

1
Login