cs_Talere
Messages postés102Date d'inscriptionvendredi 29 mars 2002StatutMembreDernière intervention14 février 2013
-
11 févr. 2004 à 16:18
mastercatz
Messages postés193Date d'inscriptionjeudi 4 décembre 2003StatutMembreDernière intervention12 août 2010
-
11 févr. 2004 à 17:12
Bonjour,
Je cherche à récuprer le type d'une variable issue d'AutoCAD. Effectivement, sa classe est AcadEntity mais je voudrais savoir quel type est-ce (AcadLWpolylign,AcadLine ...)
mastercatz
Messages postés193Date d'inscriptionjeudi 4 décembre 2003StatutMembreDernière intervention12 août 2010 11 févr. 2004 à 16:46
J'ai trouvé ce petit bout de code en farfouillant, peut etre que ca poura t'aider. A voir .........
Sub Example_Type()
' This example creates a leader in model space.
' It then changes the type of the leader.
Dim leaderObj As AcadLeader
Dim points(0 To 8) As Double
Dim leaderType As Integer
Dim annotationObject As AcadEntity
points(0) 0: points(1) 2: points(2) = 0 points(3) 4: points(4) 4: points(5) = 0 points(6) 4: points(7) 2: points(8) = 0
leaderType = acLineNoArrow
Set annotationObject = Nothing
' Create the leader object in model space
Set leaderObj = ThisDrawing.ModelSpace.AddLeader(points, annotationObject, leaderType)
ZoomAll
' Find the current leader type
leaderType = leaderObj.Type
MsgBox "The leader type is " & Choose(leaderObj.Type + 1, "acLineNoArrow.", "acSplineNoArrow.", "acLineWithArrow.", "acSplineWithArrow."), , "Type Example"
' Change the leader type
leaderObj.Type = acLineWithArrow
leaderObj.Update
MsgBox "The leader type is " & Choose(leaderObj.Type + 1, "acLineNoArrow.", "acSplineNoArrow.", "acLineWithArrow.", "acSplineWithArrow."), , "Type Example"
' Change the leader type
leaderObj.Type = acSplineNoArrow
leaderObj.Update
MsgBox "The leader type is " & Choose(leaderObj.Type + 1, "acLineNoArrow.", "acSplineNoArrow.", "acLineWithArrow.", "acSplineWithArrow."), , "Type Example"
' Change the leader type
leaderObj.Type = acSplineWithArrow
leaderObj.Update
MsgBox "The leader type is " & Choose(leaderObj.Type + 1, "acLineNoArrow.", "acSplineNoArrow.", "acLineWithArrow.", "acSplineWithArrow."), , "Type Example"