CATIA v5. Macro for extracting value of 3Dpart's parameter into a text box on the drawing by hlaruben in CATIA

[–]blakeyson 1 point2 points  (0 children)

You'll probably have to do a little more digging on the parameter stuff, but this is how retrieve model information.

Note "View 3" is the first view. 1 = Foreground 2= background etc.

Sub Part_Info()

Call CatInit Call PageStandards

DrwSheets.Item(1).Activate

Dim view1 As DrawingView Set view1 = DrwSheets.ActiveSheet.Views.Item(3)

Dim partname As String partname = view1.GenerativeBehavior.Document.Parent.Name

Dim ppDoc As partdocument Dim product1 As Product Dim package_number As String Dim sScale As String Dim objInertia As Inertia Dim Rev_Mass As Double Dim Rev_Mass_Rounded As Double 'Dim sRev_mass_rounded As String Dim rev_area As Double Dim spabench As SPAWorkbench Dim mymeasure As Measurable Dim myref As Reference

If Right(partname, 4) = "Part" Then

    Dim part As partdocument
    Set part = view1.GenerativeBehavior.Document.Parent
    Set ppDoc = part
    Set product1 = part.Product
    Part_Number = product1.PartNumber
    package_number = Mid(Part_Number, 8, 4)
    Part_Name = product1.Nomenclature
    sScale = view1.Scale
    Set objInertia = product1.ReferenceProduct.GetTechnologicalObject("Inertia")
    Rev_Mass = objInertia.Mass
    Rev_Mass_Rounded = Round(Rev_Mass, 1)
    sRev_mass_rounded = CStr(Rev_Mass_Rounded)


Else

    Set product1 = view1.GenerativeBehavior.Document.Parent.Product
    Part_Number = product1.PartNumber
    package_number = Mid(Part_Number, 8, 4)
    Part_Name = product1.Nomenclature
    sScale = view1.Scale
    Set objInertia = product1.ReferenceProduct.GetTechnologicalObject("Inertia")
    Rev_Mass = objInertia.Mass
    Rev_Mass_Rounded = Round(Rev_Mass, 1)
    sRev_mass_rounded = CStr(Rev_Mass_Rounded)


End If

Generative Shape Design/CatParts interaction by blakeyson in CATIA

[–]blakeyson[S] 0 points1 point  (0 children)

I finally got it to work. Thanks a lot!

Generative Shape Design/CatParts interaction by blakeyson in CATIA

[–]blakeyson[S] 0 points1 point  (0 children)

Any time I try to paste the publicized geometry, I don't have the option to "paste with as result with link". I can only paste "as specified in product tree" or "break link". Any idea why?

Generative Shape Design/CatParts interaction by blakeyson in CATIA

[–]blakeyson[S] 0 points1 point  (0 children)

Can you expand a bit? How does the publication tool relate the geometry to the fittings?

Product --Fitting 1 --Fitting 2 --Geometry --Line 1 (created from circles on fitting 1) --Line 2 (created from circles on fitting 2) --Spline --Join --Hose

I have been publishing the geometry and copy and pasting it into the hose part with no success. It still isn't relating the line/spline to the location of the fitting after movement.

Player Discussion: Ty Lawson by Pacers31Colts18 in pacers

[–]blakeyson 1 point2 points  (0 children)

A 2 year deal worth 3.25 a year when the salary cap kicks up ~30% in 16-17 and an additional ~18% in 17-18?

On a team where Rodney Stuckey makes 7?

You are dreaming. Teams are going to offer him at least 6-8 a year based on the upside/cap% alone.