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: 

How can I select the workplane which is include in the DrawingDocument with API?

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Stakin
346 Views, 2 Replies

How can I select the workplane which is include in the DrawingDocument with API?

hi everyone,

 If i made a workplane include in a drawingdocument with api, then it will display in the view as a center line.

I want add some note to the Center line,but i didn't know hao to select it with api,

Is there have the API function to do this work?

 

 

2 REPLIES 2
Message 2 of 3
MartinBernat
in reply to: Stakin

Hi,

you can access the included workplane (projected as a line) as a regular centerline. Following code should work:

 

Sub CenterlineTest()
  Dim oDoc As DrawingDocument
  Set oDoc = ThisApplication.ActiveDocument

  Dim oCenterLine As Centerline
  Set oCenterLine = oDoc.Sheets(1).Centerlines(1)

  ' Do whatever with the centerline

  oCenterLine.Visible = False
End Sub

 

Thanks for your post,

Martin Bernat

Autodesk

Message 3 of 3
Stakin
in reply to: MartinBernat

Thanks very much.

It is work perfectly.

But if i project a lot of workplane as centerline,

 and I only particularly concern one or two of them

Can I select the centerline from the DrawingDocument's Model Browser?

 

 

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

Post to forums