Active Thread feature in Drawing in Display option tab

Active Thread feature in Drawing in Display option tab

Pratik.Ksoni
Advocate Advocate
881 Views
8 Replies
Message 1 of 9

Active Thread feature in Drawing in Display option tab

Pratik.Ksoni
Advocate
Advocate

Hello,

i need to active thread feature in inventor drawing file, i have so many drawing sheets and i want to change display state individually. is there any rule to macro that can turn on thread feature in drawing?

Please help me.

0 Likes
Accepted solutions (1)
882 Views
8 Replies
Replies (8)
Message 2 of 9

dgreatice
Collaborator
Collaborator
Accepted solution

Hi,

 

iLogic Version

try this:

 

Dim oApp As Application
    Dim oDD As DrawingDocument
    Dim oSht As Sheet
    Dim oDV As DrawingView
   
    oApp = ThisApplication
    oDD = oApp.ActiveDocument
   
    For Each oSht In oDD.Sheets
        For Each oDV In oSht.DrawingViews
            oDV.DisplayThreadFeatures = True
        Next
    Next

Please use the ACCEPT AS SOLUTION or KUDOS button if my Idea helped you to solve the problem.

Autodesk Inventor Professional Certified 2014
0 Likes
Message 3 of 9

Pratik.Ksoni
Advocate
Advocate

Hello,

how to change color of Thread feature in drawing?

 

Thanks
Pratik

0 Likes
Message 4 of 9

dgreatice
Collaborator
Collaborator

First, 

I want check you drawing.

 

1. Select thread edge.

2. Identify, layer Name is?

Capture1.JPG

 

Please use the ACCEPT AS SOLUTION or KUDOS button if my Idea helped you to solve the problem.

Autodesk Inventor Professional Certified 2014
0 Likes
Message 5 of 9

Pratik.Ksoni
Advocate
Advocate

i tried with change layer color and it works but many of line has same layer so once i change thread layer then it takes all edges color. so using i logic i have created new layer and set the color and want to give same new layer color to thread feature.

 

i hope it can clear.

 

Thanks in advance.

 

Cheers!!

0 Likes
Message 6 of 9

dgreatice
Collaborator
Collaborator

By default, thread edge save in Layer with name Visible Narrow (ISO).

 

so update my code,

 

    Dim oLayer As Layer
    oLayer = oDD.StylesManager.Layers.Item("Visible Narrow (ISO)")
   
    Dim MyColor As Color
    MyColor = oApp.TransientObjects.CreateColor(255, 0, 0)
   
    oLayer.Color = MyColor

Please use the ACCEPT AS SOLUTION or KUDOS button if my Idea helped you to solve the problem.

Autodesk Inventor Professional Certified 2014
0 Likes
Message 7 of 9

Pratik.Ksoni
Advocate
Advocate

See Below rule which i have applied to copy new layer and set color of this layer.

now i want to set this new layer color to thread feature only.

 

SyntaxEditor Code Snippet

        Dim oDD As DrawingDocument

        oDD = ThisApplication.ActiveDocument

        Dim oL As Layer

        oL = oDD.StylesManager.Layers("Hidden (ISO)").Copy("Thread Line")

        Dim oC As Inventor.Color

        oC = ThisApplication.TransientObjects.CreateColor(255, 0, 0)

        Call oC.SetColor(255, 0, 0)

        oL.Color = oC

 Thanks
Pratik

0 Likes
Message 8 of 9

Pratik.Ksoni
Advocate
Advocate

highlighted line has same layer name but i only want to change thread feature color change.

 

Capture.PNG

0 Likes
Message 9 of 9

dgreatice
Collaborator
Collaborator

Hi,

 

I think it must be difference, between VISIBLE (ISO) and VISIBLE NARROW (ISO)

Visible (ISO) are normal line/edge

Visible Narrow (ISO) are Thread line/edge

 

maybe you wrong about that.

Please use the ACCEPT AS SOLUTION or KUDOS button if my Idea helped you to solve the problem.

Autodesk Inventor Professional Certified 2014
0 Likes