Message 1 of 11
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, is there any method to select lines by layer using ilogic?
Thanks in advance
Solved! Go to Solution.
Hi, is there any method to select lines by layer using ilogic?
Thanks in advance
Solved! Go to Solution.
Regards,
Arthur Knoors
Autodesk Affiliations & Links:
Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!
! For administrative reasons, please mark a "Solution as solved" when the issue is solved !
Sorry for the lack of information, the idea is to select only the lines of a certain layer of the model in the drawing view, I searched the forum and the internet but nothing.
Thanks for the quick response
Hi,
What would you like to do with these lines of that specific layer?
Regards,
Arthur Knoors
Autodesk Affiliations & Links:
Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!
! For administrative reasons, please mark a "Solution as solved" when the issue is solved !
The idea is selecting all the lines in a certain layer to change it to another, but by means of ilogic
Regards,
Arthur Knoors
Autodesk Affiliations & Links:
Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!
! For administrative reasons, please mark a "Solution as solved" when the issue is solved !
Thanks for Your reply
Hi,
Check This for VBA:
Public Sub l()
Dim a As Application
Set a = ThisApplication
Dim b As DrawingDocument
Set b = a.ActiveDocument
Dim s As Sheet
Set s = b.Sheets.Item(1)
Dim v As DrawingView
Set v = s.DrawingViews.Item(1)
Dim sl As DrawingCurve
Dim sg As DrawingCurveSegment
For Each sl In v.DrawingCurves
For Each sg In sl.Segments
Dim lay As Layer
Set lay = b.StylesManager.Layers.Item("YOUR LAYER NAME TO BE REPLACE WITH")
If sg.Layer.Name = "YOUR LAYER NAME TO BE REPLACE" Then
sg.Layer = lay
End If
Next
Next
End Sub
this For I-logic:
Public Sub Main() Dim a As Application a = ThisApplication Dim b As DrawingDocument b = a.ActiveDocument Dim s As Sheet s = b.Sheets.Item(1) Dim v As DrawingView v = s.DrawingViews.Item(1) Dim sl As DrawingCurve Dim sg As DrawingCurveSegment For Each sl In v.DrawingCurves For Each sg In sl.Segments Dim lay As Layer lay = b.StylesManager.Layers.Item("YOUR LAYER NAME TO BE REPLACE WITH") If sg.Layer.Name = "YOUR LAYER NAME TO BE REPLACE" Then sg.Layer = lay End If Next Next End Sub
Regards,
Regards,
Arthur Knoors
Autodesk Affiliations & Links:
Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!
! For administrative reasons, please mark a "Solution as solved" when the issue is solved !
Thanks, I only have add an error handling between two next at the end, but works really fine.
That was a good idea to implement that. I do that normally too, but to provide some solutions I never do that to keep it quick and easy to understand.
Thst is also why the declarations are simple dim a as...
Good to hear that it is solved.
Regards,
Arthur Knoors
Autodesk Affiliations & Links:
Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!
! For administrative reasons, please mark a "Solution as solved" when the issue is solved !
Anyone know why this doesn't work on section views?
"Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))"