Results 1 to 5 of 5

Thread: Dimension parent vs. child

  1. #1
    Eddy Guest

    Dimension parent vs. child

    Ok.
    So, I'm a little fluent with VBA and I can create a dimension string.
    However, I want to define a child to that dimension and alter one variable
    for that child. I can reset the variable, but it becomes an override and
    not the child I'm after. My goal is to be able to draw the leaders I want
    but still be able to have the dimensions.

    Is there an easy way to make a child object from an altered parent dimension
    string?

    thanks in advance.
    Eddy Krygiel

  2. #2
    rwilkins Guest
    To create a child dimension, take the parent dimension name and add a dollar sign ($) followed by a number:

    $0 = Linear Dimensions
    $2 = Angular Dimensions
    $4 = Radial Dimensions
    $3 = Diameter Dimensions
    $6 = Ordinate Dimensions
    $7 = Leaders

    So if the only dimension style you have in the drawing is Standard:

    Dim DS as AcadDimStyle
    Set DS = Thisdrawing.DimStyles.add("Standard$7")
    DS.CopyFrom ThisDrawing.Database

    The CopyFrom method takes dimoverrides from the drawing and saves them to the child dimstyle.

  3. #3
    Eddy Guest
    First, thanks for the help. I think I got part of it covered. I can create
    child dimstyles with different variables than the parent.

    My one other issue though is my dimstyle is a moving target. My routine
    name the dimstyle based on the current dimscale. So, if my dimscale is 1,
    my dimstyle is 1. When I go to name the child of the dimstyle, I have to
    call it specifically. eg:
    Set Bdim = ThisDrawing.DimStyles.Add("1$7")
    Where Bdim is my new dimstyle. Previously, I have been creating them like
    this:
    Scalefactor = ActiveDocument.GetVariable("dimscale")
    Set Bdim = ThisDrawing.DimStyles.Add(Scalefactor)

    How can I set the child to be a factor of the dimscale? When I try to enter
    scalefactor$7 or scalefactor"$7" or something to that effect, it either
    errors out or I get a dimstyle named "scalefactor$7".

    thoughts?
    thanks for everything so far.

    eddy

    "rwilkins" <nospam@address.withheld> wrote in message
    news:306534.1102707666423.JavaMail.jive@jiveforum1 .autodesk.com...
    To create a child dimension, take the parent dimension name and add a
    dollar sign ($) followed by a number:

    $0 = Linear Dimensions
    $2 = Angular Dimensions
    $4 = Radial Dimensions
    $3 = Diameter Dimensions
    $6 = Ordinate Dimensions
    $7 = Leaders

    So if the only dimension style you have in the drawing is Standard:

    Dim DS as AcadDimStyle
    Set DS = Thisdrawing.DimStyles.add("Standard$7")
    DS.CopyFrom ThisDrawing.Database

    The CopyFrom method takes dimoverrides from the drawing and saves them to
    the child dimstyle.

  4. #4
    Jeff Mishler Guest
    Scalefactor=Scalefactor & "$7
    Set Bdim = ThisDrawing.DimStyles.Add(Scalefactor)

    --
    Jeff
    check out www.cadvault.com
    "Eddy" <ekrygiel@treanorarchitects.com> wrote in message
    news:41bb5793$1_1@newsprd01...
    First, thanks for the help. I think I got part of it covered. I can
    create child dimstyles with different variables than the parent.

    My one other issue though is my dimstyle is a moving target. My routine
    name the dimstyle based on the current dimscale. So, if my dimscale is 1,
    my dimstyle is 1. When I go to name the child of the dimstyle, I have to
    call it specifically. eg:
    Set Bdim = ThisDrawing.DimStyles.Add("1$7")
    Where Bdim is my new dimstyle. Previously, I have been creating them like
    this:
    Scalefactor = ActiveDocument.GetVariable("dimscale")
    Set Bdim = ThisDrawing.DimStyles.Add(Scalefactor)

    How can I set the child to be a factor of the dimscale? When I try to
    enter scalefactor$7 or scalefactor"$7" or something to that effect, it
    either errors out or I get a dimstyle named "scalefactor$7".

    thoughts?
    thanks for everything so far.

    eddy

    "rwilkins" <nospam@address.withheld> wrote in message
    news:306534.1102707666423.JavaMail.jive@jiveforum1 .autodesk.com...
    To create a child dimension, take the parent dimension name and add a
    dollar sign ($) followed by a number:

    $0 = Linear Dimensions
    $2 = Angular Dimensions
    $4 = Radial Dimensions
    $3 = Diameter Dimensions
    $6 = Ordinate Dimensions
    $7 = Leaders

    So if the only dimension style you have in the drawing is Standard:

    Dim DS as AcadDimStyle
    Set DS = Thisdrawing.DimStyles.add("Standard$7")
    DS.CopyFrom ThisDrawing.Database

    The CopyFrom method takes dimoverrides from the drawing and saves them to
    the child dimstyle.

  5. #5
    Eddy Guest
    thanks!!
    that did the trick.

    "Jeff Mishler" <jeff_m@cadvault.com> wrote in message
    news:41bb5a89_3@newsprd01...
    Scalefactor=Scalefactor & "$7
    Set Bdim = ThisDrawing.DimStyles.Add(Scalefactor)

    --
    Jeff
    check out www.cadvault.com
    "Eddy" <ekrygiel@treanorarchitects.com> wrote in message
    news:41bb5793$1_1@newsprd01...
    First, thanks for the help. I think I got part of it covered. I can
    create child dimstyles with different variables than the parent.

    My one other issue though is my dimstyle is a moving target. My routine
    name the dimstyle based on the current dimscale. So, if my dimscale is
    1, my dimstyle is 1. When I go to name the child of the dimstyle, I have
    to call it specifically. eg:
    Set Bdim = ThisDrawing.DimStyles.Add("1$7")
    Where Bdim is my new dimstyle. Previously, I have been creating them
    like this:
    Scalefactor = ActiveDocument.GetVariable("dimscale")
    Set Bdim = ThisDrawing.DimStyles.Add(Scalefactor)

    How can I set the child to be a factor of the dimscale? When I try to
    enter scalefactor$7 or scalefactor"$7" or something to that effect, it
    either errors out or I get a dimstyle named "scalefactor$7".

    thoughts?
    thanks for everything so far.

    eddy

    "rwilkins" <nospam@address.withheld> wrote in message
    news:306534.1102707666423.JavaMail.jive@jiveforum1 .autodesk.com...
    To create a child dimension, take the parent dimension name and add a
    dollar sign ($) followed by a number:

    $0 = Linear Dimensions
    $2 = Angular Dimensions
    $4 = Radial Dimensions
    $3 = Diameter Dimensions
    $6 = Ordinate Dimensions
    $7 = Leaders

    So if the only dimension style you have in the drawing is Standard:

    Dim DS as AcadDimStyle
    Set DS = Thisdrawing.DimStyles.add("Standard$7")
    DS.CopyFrom ThisDrawing.Database

    The CopyFrom method takes dimoverrides from the drawing and saves them
    to the child dimstyle.



Similar Threads

  1. Find pcell "parent"
    By Roger Light in forum Cadence
    Replies: 2
    Last Post: 07-08-2005, 05:10 AM
  2. can a sketch dimension drive a "feature dimension"
    By Gil Alsberg in forum SolidWorks
    Replies: 4
    Last Post: 06-13-2005, 09:10 AM
  3. Parent child database on Open Access
    By Erik Wanta in forum Cadence
    Replies: 0
    Last Post: 05-09-2005, 05:10 PM
  4. Parent child database on Open Access
    By Bernd Fischer in forum Cadence
    Replies: 5
    Last Post: 02-21-2005, 02:00 AM
  5. Delete parent sketch relations quickly?
    By Paul Salvador in forum SolidWorks
    Replies: 2
    Last Post: 02-15-2005, 06:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other forums: Access Forum - Microsoft Office Forum - Exchange Server Forum