Problem to catch the Point from the Edge

Problem to catch the Point from the Edge

o_basguener
Explorer Explorer
243 Views
2 Replies
Message 1 of 3

Problem to catch the Point from the Edge

o_basguener
Explorer
Explorer

Hey Guys,

 

I have a Problem with measuring the lid in height. I can't catch the Point1 from the Edge. I want to measure from Point1 to Edge3. I also tried with Edge1 or end of point from Edge1.

 

I put picures in attachment and copied the code.

 

I hope someone can help me.

 

Thank you.

 

Lid.JPGLid2.JPG

 

oCompOcc2 = oAssDoc.ComponentDefinition.Occurrences.ItemByName("Lid")
oPartDoc2 = oCompOcc2.Definition.Document
myNamedEntities2 = iLogicVb.Automation.GetNamedEntities(oPartDoc2)
oEdge1 = myNamedEntities2.FindEntity("Edge1")

Call oCompOcc2.CreateGeometryProxy(oEdge1, oEdge1Proxy)

myCurveCandidates = oFrontView.DrawingCurves(Proxy of Edge3) 
myDrawingCurve1 = myCurveCandidates.Item(1) 
oGeoIntent1 = oSheet.CreateGeometryIntent(myDrawingCurve1)
	
myCurveCandidates = oFrontView.DrawingCurves(oEdge1Proxy)
myDrawingCurve2 = myCurveCandidates.Item(1)
	
oGeoIntent2 = oSheet.CreateGeometryIntent(myDrawingCurve2)

myPos2d = oTG.CreatePoint2d(myDrawingCurve1.StartPoint.X +1,oFrontView.Top-6) 

oSheet.DrawingDimensions.GeneralDimensions.AddLinear(myPos2d, oGeoIntent1, oGeoIntent2)

 

0 Likes
Accepted solutions (1)
244 Views
2 Replies
Replies (2)
Message 2 of 3

A.Acheson
Mentor
Mentor

Hi @o_basguener 

I'm not sure where tour retrieving rhe drawi g curve from. This doesn't seem right.

myCurveCandidates = oFrontView.DrawingCurves(Proxy of Edge3)

Something like this should work

 

' Finds the drawing edge that represents the one with the named entity.
			Try
				drawViewCurves = oFrontView.DrawingCurves(oEdge1Proxy)
			Catch
				Logger.Info("Error getting DrawViewCurves")
			End Try
			Try
				drawCurve = drawViewCurves.Item(1)
			Catch
				Logger.Info("Error getting DrawViewCurve")
			End Try

 

Assuming your getting the correct point on each of the intents you should set the type of dimesion required. 

 

DimensionTypeEnum.kVerticalDimensionType

 

Syntax

GeneralDimensions.AddLinearTextOrigin As Point2dIntentOne As GeometryIntent, [IntentTwo] As Variant, [DimensionType] As DimensionTypeEnum, [ArrowheadsInside] As Boolean, [DimensionStyle] As Variant, [Layer] As Variant ) As LinearGeneralDimension

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 3 of 3

o_basguener
Explorer
Explorer
Accepted solution

Hi @A.Acheson ,

 

Thank you for reply.

 

I tried to put in oGeoInten2 behind myDrawingCurve2  the value from PointIntentEnum with kEndPointIntent.

oGeoIntent2 = oSheet.CreateGeometryIntent(myDrawingCurve2 , PointIntentEnum.kEndPointIntent )

 

That was the solution. Thank you.

 

0 Likes