<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic arc data from function back to multiple forms in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/arc-data-from-function-back-to-multiple-forms/m-p/1894241#M27206</link>
    <description>I need some help passing arc entity data back into many forms and sub &lt;BR /&gt;
routines from a function..&lt;BR /&gt;
&lt;BR /&gt;
'in form1&lt;BR /&gt;
Call GetEnt    ' in form1 call function&lt;BR /&gt;
&lt;BR /&gt;
'function in module1&lt;BR /&gt;
&lt;BR /&gt;
Public Function GetEnt() As AcadEntity&lt;BR /&gt;
Dim ent As AcadEntity&lt;BR /&gt;
Dim arc As AcadArc&lt;BR /&gt;
On Error Resume Next&lt;BR /&gt;
ThisDrawing.Utility.GetEntity ent, "Select Curve to Insert block: "&lt;BR /&gt;
&lt;BR /&gt;
If TypeOf ent Is AcadLWPolyline Then&lt;BR /&gt;
MsgBox " Please Select Arc, Entity was not an ARC."&lt;BR /&gt;
End If&lt;BR /&gt;
&lt;BR /&gt;
If TypeOf ent Is AcadArc Then&lt;BR /&gt;
Set arc = ent&lt;BR /&gt;
STRarclength = arc.arclength&lt;BR /&gt;
STRCENTERPT = arc.Center&lt;BR /&gt;
'what do i do here to send arc data back?&lt;BR /&gt;
End If&lt;BR /&gt;
End Function&lt;BR /&gt;
&lt;BR /&gt;
'return back to form1&lt;BR /&gt;
'need to hand off the ent data Arc, arclength, arc.Center from the function&lt;BR /&gt;
&lt;BR /&gt;
'how do I call arc data from function to be used here?&lt;BR /&gt;
userform1.Textbox5.text = lightsset = STRarclength / 50&lt;BR /&gt;
userform2.Textbox5.text = lightsset = STRarclength / 50&lt;BR /&gt;
&lt;BR /&gt;
any help is appreciated.&lt;BR /&gt;
&lt;BR /&gt;
Thank you&lt;BR /&gt;
John</description>
    <pubDate>Mon, 19 Feb 2007 15:41:37 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2007-02-19T15:41:37Z</dc:date>
    <item>
      <title>arc data from function back to multiple forms</title>
      <link>https://forums.autodesk.com/t5/vba-forum/arc-data-from-function-back-to-multiple-forms/m-p/1894241#M27206</link>
      <description>I need some help passing arc entity data back into many forms and sub &lt;BR /&gt;
routines from a function..&lt;BR /&gt;
&lt;BR /&gt;
'in form1&lt;BR /&gt;
Call GetEnt    ' in form1 call function&lt;BR /&gt;
&lt;BR /&gt;
'function in module1&lt;BR /&gt;
&lt;BR /&gt;
Public Function GetEnt() As AcadEntity&lt;BR /&gt;
Dim ent As AcadEntity&lt;BR /&gt;
Dim arc As AcadArc&lt;BR /&gt;
On Error Resume Next&lt;BR /&gt;
ThisDrawing.Utility.GetEntity ent, "Select Curve to Insert block: "&lt;BR /&gt;
&lt;BR /&gt;
If TypeOf ent Is AcadLWPolyline Then&lt;BR /&gt;
MsgBox " Please Select Arc, Entity was not an ARC."&lt;BR /&gt;
End If&lt;BR /&gt;
&lt;BR /&gt;
If TypeOf ent Is AcadArc Then&lt;BR /&gt;
Set arc = ent&lt;BR /&gt;
STRarclength = arc.arclength&lt;BR /&gt;
STRCENTERPT = arc.Center&lt;BR /&gt;
'what do i do here to send arc data back?&lt;BR /&gt;
End If&lt;BR /&gt;
End Function&lt;BR /&gt;
&lt;BR /&gt;
'return back to form1&lt;BR /&gt;
'need to hand off the ent data Arc, arclength, arc.Center from the function&lt;BR /&gt;
&lt;BR /&gt;
'how do I call arc data from function to be used here?&lt;BR /&gt;
userform1.Textbox5.text = lightsset = STRarclength / 50&lt;BR /&gt;
userform2.Textbox5.text = lightsset = STRarclength / 50&lt;BR /&gt;
&lt;BR /&gt;
any help is appreciated.&lt;BR /&gt;
&lt;BR /&gt;
Thank you&lt;BR /&gt;
John</description>
      <pubDate>Mon, 19 Feb 2007 15:41:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/arc-data-from-function-back-to-multiple-forms/m-p/1894241#M27206</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-02-19T15:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: arc data from function back to multiple forms</title>
      <link>https://forums.autodesk.com/t5/vba-forum/arc-data-from-function-back-to-multiple-forms/m-p/1894242#M27207</link>
      <description>Hi, John&lt;BR /&gt;
Please look at this line:&lt;BR /&gt;
If TypeOf ent Is AcadLWPolyline Then&lt;BR /&gt;
MsgBox " Please Select Arc, Entity was not an ARC."&lt;BR /&gt;
End If&lt;BR /&gt;
&lt;BR /&gt;
If you need to sure that you've selected an arc&lt;BR /&gt;
this string must be like this:&lt;BR /&gt;
&lt;BR /&gt;
If Not TypeOf ent Is AcadArc Then&lt;BR /&gt;
MsgBox " Please Select Arc, Entity was not an ARC."&lt;BR /&gt;
""&lt;YOUR code="" here=""&gt;"""&lt;BR /&gt;
End If&lt;BR /&gt;
&lt;BR /&gt;
Hope you'll understand me&lt;BR /&gt;
&lt;BR /&gt;
~'J'~&lt;/YOUR&gt;</description>
      <pubDate>Mon, 19 Feb 2007 16:05:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/arc-data-from-function-back-to-multiple-forms/m-p/1894242#M27207</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-02-19T16:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: arc data from function back to multiple forms</title>
      <link>https://forums.autodesk.com/t5/vba-forum/arc-data-from-function-back-to-multiple-forms/m-p/1894243#M27208</link>
      <description>A LWPolyline can also be an Arc. I think what you need to look at is the Bulge of the LWPolyline. &lt;BR /&gt;
&lt;BR /&gt;
I did a quick search for "polyline arc bulge" and there are lots of posts.</description>
      <pubDate>Mon, 19 Feb 2007 16:24:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/arc-data-from-function-back-to-multiple-forms/m-p/1894243#M27208</guid>
      <dc:creator>arcticad</dc:creator>
      <dc:date>2007-02-19T16:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: arc data from function back to multiple forms</title>
      <link>https://forums.autodesk.com/t5/vba-forum/arc-data-from-function-back-to-multiple-forms/m-p/1894244#M27209</link>
      <description>Fatty, arcticad&lt;BR /&gt;
&lt;BR /&gt;
Thank you for the help with the If Not TypeOf ent Is AcadArc I will change &lt;BR /&gt;
that.&lt;BR /&gt;
&lt;BR /&gt;
The area that I was trying to find out was how to save the arc and data &lt;BR /&gt;
associated with the arc from the function so that it can be used outside a &lt;BR /&gt;
single routine. The original routine had the selection of the ent in a &lt;BR /&gt;
private sub in form1. I then saved the arc.length and others data in module1 &lt;BR /&gt;
that I declared as public.  The problem was able to save the associated data &lt;BR /&gt;
like arc length, radius to module1 but I could pass the ent itself  to &lt;BR /&gt;
module1 to other sub routines in different forms so I could insert blocks &lt;BR /&gt;
and label that arc.&lt;BR /&gt;
&lt;BR /&gt;
call the function&lt;BR /&gt;
&lt;BR /&gt;
do something&lt;BR /&gt;
&lt;BR /&gt;
how do I return to the routine with the ent/arc and also save in module1 so &lt;BR /&gt;
it could be used in other forms&lt;BR /&gt;
&lt;BR /&gt;
I guess I don't understand the argument statements in functions and if and &lt;BR /&gt;
when they are need in all functions&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thank you&lt;BR /&gt;
John&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;ARCTICAD&gt; wrote in message news:5491617@discussion.autodesk.com...&lt;BR /&gt;
A LWPolyline can also be an Arc. I think what you need to look at is the &lt;BR /&gt;
Bulge of the LWPolyline.&lt;BR /&gt;
&lt;BR /&gt;
I did a quick search for "polyline arc bulge" and there are lots of posts.&lt;/ARCTICAD&gt;</description>
      <pubDate>Mon, 19 Feb 2007 19:41:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/arc-data-from-function-back-to-multiple-forms/m-p/1894244#M27209</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-02-19T19:41:58Z</dc:date>
    </item>
  </channel>
</rss>

