Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

User Work Plane Naming

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
ASchlaack
1685 Views, 9 Replies

User Work Plane Naming

I have work planes in a part that I have named, when I place the part I go to the Display Options tab and click include all user work features so it will bring all of my planes in. Is there a way to have it auto name the planes according to their name in the model? I just want an easier quicker way of naming each one on large models with quite a few planes that I have to bring over.

 

It doesn't matter if it's through iLogic or just a random command to do this, whatever can work will work for me just fine. 

Thanks,
Aaron Schlaack
---------------------------------------------------------------------------------
Autodesk Inventor 2018
Dell Windows 8.1 64 bit Intel(R) Xeon(R) @ 3.50GHz 32GB Ram
9 REPLIES 9
Message 2 of 10
Anonymous
in reply to: ASchlaack

Aaron! How have you been?

 

If I'm being perfectly honest, I didn't even know there was a button for including all user work features. However, I hardly ever ustilize user work planes in an idw.

 

However I'm certain that this can be done with iLogic. You can do pretty much anything with iLogic.

Message 3 of 10
ASchlaack
in reply to: Anonymous

I've been good, how about yourself?

I assumed there was most likely an ilogic way to do this but I just wouldn't have a clue where to even start with a code and I couldn't find a snippet for anything close to doing this.
Thanks,
Aaron Schlaack
---------------------------------------------------------------------------------
Autodesk Inventor 2018
Dell Windows 8.1 64 bit Intel(R) Xeon(R) @ 3.50GHz 32GB Ram
Message 4 of 10
ASchlaack
in reply to: ASchlaack

To farther explain....

 

So for the include user work planes, this is what I meant, it's in the window when you place a view:

 

User Work Features.PNG

 

To start, my part looks like this for an easy example, the planes are all named:

 

3D Part.PNG

 

And by turning on the user planes and placing a view it looks like this (the red lines are all of my workplanes I created):

 

Unnamed View.PNG

 

But what I want is for it to somehow pull the names of each plane from the part itself and look like this:

 

View With Names.PNG

 

 

 

 

Thanks,
Aaron Schlaack
---------------------------------------------------------------------------------
Autodesk Inventor 2018
Dell Windows 8.1 64 bit Intel(R) Xeon(R) @ 3.50GHz 32GB Ram
Message 5 of 10
Anonymous
in reply to: ASchlaack

Not sure if this reply was meant to be for me personally or mainly as a "bump" to the thread buuuuuut yeah, I knew what you meant, I just have no idea how to accomplish it automatically. I could potentially think of a way to link the names in one instance (maybe), but as for a method which pulls the planes into the view and attaches the names to them, I'm not really sure.

Message 6 of 10
ASchlaack
in reply to: Anonymous

It was more or less like you said, a "bump". I also have it posted in the custumization forums and I had a guy ask for basically what I posted on here so I just posted it both places. Thanks for your reply though!!
Thanks,
Aaron Schlaack
---------------------------------------------------------------------------------
Autodesk Inventor 2018
Dell Windows 8.1 64 bit Intel(R) Xeon(R) @ 3.50GHz 32GB Ram
Message 7 of 10
Anonymous
in reply to: ASchlaack

And as a reply to this specific post...

 

I'm also doing well 🙂 Just been busy as ever at work. It has made it somewhat challenging to find time to get on the autodesk forums as of late. But I am glad to see you're still at it and still here.

Message 8 of 10
Message 9 of 10
ASchlaack
in reply to: ASchlaack

On the other post of this same thing in "Inventor Customization" xiaodong.liang created a blog post for me with the answer:

 

http://adndevblog.typepad.com/manufacturing/2015/04/add-note-for-centerline-of-work-feature-in-drawi...

Thanks,
Aaron Schlaack
---------------------------------------------------------------------------------
Autodesk Inventor 2018
Dell Windows 8.1 64 bit Intel(R) Xeon(R) @ 3.50GHz 32GB Ram
Message 10 of 10
KenVaessen
in reply to: ASchlaack

This works great for me. Is it also possible to change the code for me so I get Balloons instead of notes? I need this to get a Grid. So Ideal would be If I get a balloon on top and at the bottom of the line in the drawing. 

 

At the moment I'm using this code:

 

Public Sub Plane_name()


Dim oDoc As DrawingDocument

Set oDoc = ThisApplication.ActiveDocument


Dim oTG As TransientGeometry

Set oTG = ThisApplication.TransientGeometry


Dim oActiveSheet As Sheet

Set oActiveSheet = oDoc.ActiveSheet


Dim oCenterLine As Centerline


For Each oCenterLine In oActiveSheet.Centerlines

If Not oCenterLine.ModelWorkFeature Is Nothing Then

 

'select start point or end point as the position for the drawing note


Dim oPos As Point2d


Dim oStPos As Point2d

Set oStPos = oCenterLine.StartPoint


Dim oEndPos As Point2d

Set oEndPos = oCenterLine.EndPoint


If Math.Abs(oStPos.X - oEndPos.X) > Math.Abs(oStPos.Y - oEndPos.Y) Then

' put drawing note at the right of the center line


If oStPos.X > oEndPos.X Then

' set position of drawing note at start point

Set oPos = oStPos

Else

' set position of drawing note at end point

Set oPos = oEndPos

End If

Else

' put drawing note at the bottom of the center line

If oStPos.Y > oEndPos.Y Then

' set position of drawing note at end point

Set oPos = oEndPos

Else

' set position of drawing note at start point

Set oPos = oStPos

End If

End If


Dim oWP_Name As String

oWP_Name = oCenterLine.ModelWorkFeature.Name

 

Dim oLeaderPoints As ObjectCollection

Set oLeaderPoints = ThisApplication.TransientObjects.CreateObjectCollection()


Call oLeaderPoints.Add(oTG.CreatePoint2d(oPos.X, oPos.Y))


' Create geometry intent from position

Dim oGeometryIntent As GeometryIntent

Set oGeometryIntent = oActiveSheet.CreateGeometryIntent(oCenterLine, oPos)


Call oLeaderPoints.Add(oGeometryIntent)


' add leader note

Dim oLeaderNote As LeaderNote

Call oActiveSheet.DrawingNotes.LeaderNotes.Add(oLeaderPoints, oWP_Name)


End If

Next


End Sub

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report