Determinde the model parameter name

Determinde the model parameter name

Anonymous
Not applicable
458 Views
3 Replies
Message 1 of 4

Determinde the model parameter name

Anonymous
Not applicable
I used this code to make a new workplane which is offset from the XZ plane
by a distance of .2
How to determine what model parameter (name) of .2?
Thx,

On Error Resume Next
Dim oDoc As PartDocument
Set oDoc = ThisApplication.ActiveDocument

Dim oOriginWP As WorkPlane
Set oOriginWP = oDoc.ComponentDefinition.WorkPlanes.Item("YZ Plane")

Dim oNewWP As WorkPlane
Set oNewWP = oDoc.ComponentDefinition.WorkPlanes.Item("New WorkPlane")
If Err Then
Err.Clear
Else
Set oNewWP =
oDoc.ComponentDefinition.WorkPlanes.AddByPlaneAndOffset(oOriginWP, 0.2,
False)
oNewWP.Name = "New WorkPlane"
End If

--
www.CVAengineering.com

IV11 Pro. sp2 and IV2008 Pro. sp1
Vault 2008 sp1
Window XP Pro sp2
Pentium 3.2 Ghz, 3.0 GB of RAM
NVIDIA FX 3400 91.85
SpacePilot V 3.3.6
0 Likes
459 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable

oNewWP.Definition.Offset.Name


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
I
used this code to make a new workplane which is offset from the XZ plane

by a distance of .2
How to determine what model parameter (name)
of  .2?
Thx,

On Error Resume Next
    Dim
oDoc As PartDocument
    Set oDoc =
ThisApplication.ActiveDocument

    Dim oOriginWP As
WorkPlane
    Set oOriginWP =
oDoc.ComponentDefinition.WorkPlanes.Item("YZ Plane")

   
Dim oNewWP As WorkPlane
    Set oNewWP =
oDoc.ComponentDefinition.WorkPlanes.Item("New
WorkPlane")
    If Err
Then
       
Err.Clear
           
Else
        Set oNewWP =

oDoc.ComponentDefinition.WorkPlanes.AddByPlaneAndOffset(oOriginWP, 0.2,

False)
        oNewWP.Name = "New
WorkPlane"
    End If

--

href="http://www.CVAengineering.com">www.CVAengineering.com


IV11
Pro. sp2 and IV2008 Pro. sp1
Vault 2008 sp1
Window  XP Pro 
sp2
Pentium 3.2 Ghz, 3.0 GB of RAM
NVIDIA FX 3400  
91.85
SpacePilot  V 3.3.6
Message 3 of 4

Anonymous
Not applicable

Thx, Brian

CVA


 

IV11 Pro. sp2 and IV2008 Pro. sp1
Vault 2008 sp1
Window  XP
Pro  sp2
Pentium 3.2 Ghz, 3.0 GB of RAM
NVIDIA FX 3400  
91.85
SpacePilot  V 3.3.6


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">


oNewWP.Definition.Offset.Name


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
I
used this code to make a new workplane which is offset from the XZ plane

by a distance of .2
How to determine what model parameter (name)
of  .2?
Thx,

On Error Resume Next
    Dim
oDoc As PartDocument
    Set oDoc =
ThisApplication.ActiveDocument

    Dim oOriginWP As
WorkPlane
    Set oOriginWP =
oDoc.ComponentDefinition.WorkPlanes.Item("YZ
Plane")

    Dim oNewWP As
WorkPlane
    Set oNewWP =
oDoc.ComponentDefinition.WorkPlanes.Item("New
WorkPlane")
    If Err
Then
       
Err.Clear
           
Else
        Set oNewWP =

oDoc.ComponentDefinition.WorkPlanes.AddByPlaneAndOffset(oOriginWP, 0.2,

False)
        oNewWP.Name = "New
WorkPlane"
    End If

--

href="http://www.CVAengineering.com">www.CVAengineering.com


IV11
Pro. sp2 and IV2008 Pro. sp1
Vault 2008 sp1
Window  XP Pro 
sp2
Pentium 3.2 Ghz, 3.0 GB of RAM
NVIDIA FX 3400  
91.85
SpacePilot  V 3.3.6
0 Likes
Message 4 of 4

Anonymous
Not applicable

Hi Brian,

 

Do you know how I would be able to find function calls like the one you used here? If this post wasn't here there would be no way to figure out that there are more properties under the .Definition object. Is there a better way to use the object browser in VS?

 

Thanks,

-Thomas

 

 

0 Likes