Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Hide curve in drawing view by iLogic

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
artemijs.nille
584 Views, 6 Replies

Hide curve in drawing view by iLogic

I have created an entity "AnsaugDKanteDSAussen " in 3d model of a part.

Dim Blatt_1 = ThisDrawing.Sheets.ItemByName("Blatt:1")
Dim ANSICHT23 = Blatt_1.DrawingViews.ItemByName("ANSICHT23")
Dim AnsaugDKanteDSAussen = ANSICHT23.GetIntent("AnsaugDKanteDSAussen")

In the picture below you can see this curve in the drawing view.

How can i hide this curve by iLogic?

6 REPLIES 6
Message 2 of 7

Once you found the curve (segment) you can set its visibility. You need to do this on the 'drawingCurveSegment' and not the 'DrawingCurve' 

 

Dim activeSheet As Sheet
activeSheet = ThisApplication.ActiveDocument.activeSheet

Dim crv As DrawingCurveSegment
crv = ThisApplication.CommandManager.Pick(kDrawingCurveSegmentFilter, "pick curve")

crv.Visible = False

  

Contact me for custom app development info@basautomationservices.com. Follow below links to view my Inventor appstore apps.

Free apps: Smart Leader | Part Visibility Utility | Property Editor | Mate Origins

Paid apps: Frame Stiffener Tool | Constrain Plane Toggle


Message 3 of 7

Thank you for a reply.

In your solution i have to pick the curve, that i want to hide, MANUALLY.

How can i do it without manual picking, but by assigning my entity  "AnsaugDKanteDSAussen" to this "DrawingCurveSegment"?

 

Message 4 of 7

I know, this was just an example. You need to retrieve the drawing curve from that intent, and then hide the segments that compose this curve. 

Contact me for custom app development info@basautomationservices.com. Follow below links to view my Inventor appstore apps.

Free apps: Smart Leader | Part Visibility Utility | Property Editor | Mate Origins

Paid apps: Frame Stiffener Tool | Constrain Plane Toggle


Message 5 of 7

I am sorry but i dont understand how should i do that.

My Intent is:

Dim AnsaugDKanteDSAussen = Deckscheibe.GetIntent("AnsaugDKanteDSAussen")

 how can i retrieve the curve from the Intent "AnsaugDKanteDSAussen"?

Message 6 of 7
Ralf_Krieg
in reply to: artemijs.nille

Hello

 

Dim Blatt_1 = ThisDrawing.Sheets.ItemByName("Blatt:1")
Dim ANSICHT23 = Blatt_1.DrawingViews.ItemByName("ANSICHT23")
Dim AnsaugDKanteDSAussen = ANSICHT23.GetIntent("AnsaugDKanteDSAussen")

Dim oDrawCurve As DrawingCurve = TryCast(AnsaugDKanteDSAussen.Geometry, DrawingCurve)
If oDrawCurve IsNot Nothing Then
	Dim oDrawCurveSegment As DrawingCurveSegment
	For Each oDrawCurveSegment In oDrawCurve.Segments
		oDrawCurveSegment.Visible = False
	Next
End If

R. Krieg
RKW Solutions GmbH
www.rkw-solutions.com
Message 7 of 7
artemijs.nille
in reply to: Ralf_Krieg

Hello krieg,

 

thank you very much again.

it works perfeckt

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

Post to forums  

Autodesk Design & Make Report