Hide curve in drawing view by iLogic

artemijs.nille
Contributor
Contributor

Hide curve in drawing view by iLogic

artemijs.nille
Contributor
Contributor

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?

0 Likes
Reply
Accepted solutions (1)
618 Views
6 Replies
Replies (6)

basautomationservices
Advocate
Advocate

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 | Mate Origins

Paid apps: Frame Stiffener Tool | Constrain Plane Toggle | Property Editor Pro


0 Likes

artemijs.nille
Contributor
Contributor

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"?

 

0 Likes

basautomationservices
Advocate
Advocate

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 | Mate Origins

Paid apps: Frame Stiffener Tool | Constrain Plane Toggle | Property Editor Pro


0 Likes

artemijs.nille
Contributor
Contributor

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"?

0 Likes

Ralf_Krieg
Advisor
Advisor
Accepted solution

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
0 Likes

artemijs.nille
Contributor
Contributor

Hello krieg,

 

thank you very much again.

it works perfeckt

0 Likes