Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dim As Variant in VFP?
Message
From
14/03/2000 16:10:13
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00345401
Message ID:
00345545
Views:
24
Michael,

I used Visual Basic 5 Control Creation edition...

Made the input and output variables public, and compiled it as an ACTIVEX control. Then stuck it on a form in VFP6 and set some properties... ran the main method... and looked at the output variables...

I have some code where I extract title block info... I can post it if you like?

Mike

>Michael;
>
>Jeeze - you sure have to know a lot of different languages these days to get real work done!
>
>Interesting approach - I've written VB stuff, but never compiled them as ActiveX nor used it in VFP. Is there anyplace I can get a small example of how it's done?
>
>Michael
>
>>Michael,
>>
>>I had the same problem...
>>
>>I just wrote the code in VB and compiled it as an ACTIVEX component... I call the the component from VFP...
>>
>>Mike
>>
>>
>>
>>
>>
>>>Hmmm... So once the value gets assigned to the variable, I may or may not be able to extract the data - or assign my data to the variable in the proper format?
>>>
>>>Is the best I can do assigning ACAD data to a variable and then try to decipher it with the debugger?
>>>
>>>>ALL VFP variables are of type Variant. Basically, they can accept any data type. There may, however, be some restriction using them with VB Variant logic.
>>>>
>>>>>I'm trying to insert drawings into AutoCAD from VFP. Of course, there are guides for doing this stuff in VB, but not for VFP. Most of my problems are related to variable types that don't seem to be available in VFP.
>>>>>
>>>>>For example, to grab the X,Y,Z co-ordinate of a point in AutoCAD, you must:
>>>>>
>>>>>==================================================================
>>>>>Dim InsPt As Variant
>>>>>Dim strX As String, strY As String
>>>>>Dim Units As Long
>>>>>
>>>>>' Return a point using a prompt
>>>>>InsPt = ThisDrawing.Utility.GetPoint(, "Select Insertion Point: ")
>>>>>strX = InsPt(0)
>>>>>strY = InsPt(1)
>>>>>Units = ThisDrawing.GetVariable("luprec") ' get the drawing's units precision
>>>>>
>>>>>strX = FormatPnt(strX, Units) ' format the point to the drawing's units precision
>>>>>strY = FormatPnt(strY, Units)
>>>>>edXpnt.Text = strX ' display the point
>>>>>edYpnt.Text = strY
>>>>>==================================================================
>>>>>
>>>>>My question is, how do I deal with variables of type 'variant' in VFP?
>>>>>
>>>>>TIA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform