I'm trying to get data from a database in order to draw a line on a vb6 form. I was looking at this site, but I'm not even a beginner in vb6, and I really couldn't follow it.
If anyone has any suggestion, even if it's just about drawing a line in vb6 (not dynamically), I'd appreciate it. Thanks!
Here's one way you dynamically draw a line:
Me.Line (x1, y1)-(x2, y2)
Basically, this allows to to draw a straight line from one co-ordinate to another; for example:
Me.Line (10, 10)-(1000, 1000)
You could just replace these values with values from the DB.
Related
I'm trying to plot a grid of squares given in the following format
{'p0a0': [[1255.1929931640625, 1430.1819458007812, 1428.170166015625, 1253.1811828613281, 1255.1929931640625], [407.78900146484375, 409.629638671875, 600.617431640625, 598.7767791748047, 407.78900146484375]], 'p0a1': ....} and once plotted it should look like this
I'm trying to pyqtgraph.PlotDataItem.setData() method. My idea was to use a for loop to iterate over all the keys in the dictionary and plot all the grid points (squares) in the same plot but, the setData() method inherently any clears previous data before plotting. Resulting in giving me the following output only one square is highlighted instead of all 64 squares
So, my question is how do I bypass the built-in resting when I call .setData() method? or If that can't be done, would anyone have a suggestion to go arround it?
I tryed giving the whole dictionary but, it didn't work. also I tried other ploting items but, couldn't find anything that works for my requiremnts.
Does anyone know how to draw an exact x=y line in OriginPro scatter plot? I already looked into the Internet and OriginPro forums with no exact solution. Many thanks in advance.
Try this:
Firstly make a column of numbers in Excel (...,-3,-2,-1,0,1,2,3,4,5,...), copy that. Then create a new Book in Origin, paste it in 2 columns: (X) and (Y). After highlight theese 2 columns with your cursor and go to Plot -> Line. That's it.
Does anyone know of macro or custom command I can make to quickly annotate the area of a polyline in autocad?
I'm doing a project where I need to measure the lot and house size of several city blocks. I've got a drawing going but I don't want to measure and write out the area of each site, that will take to long. I've seen custom commands in the past that quickly do this kind of thing but I don't know how to make my own.
And I'm desperately avoiding doing it by hand one at a time as most likely I will need to make adjustments to my design later on.
The best method I can think of is to utilize the MTEXT command and use a FIELD to link the Area of the Polyline to the MTEXT box.
Type FIELD at the command line, choose Object, select your Polyline and you will see the Area property.
Here is a link on the CADTutor site that covers it a bit more in depth along with a link to a forum post that has this automated via a Lisp routine.
http://www.cadtutor.net/forum/archive/index.php/t-46628.html
Forgive my ignorance. I'm a web developer tasked with integrating an app with AutoCAD and I have no experience with the software or CAD files in general.
I have hooked it up to A360 and the Forge APIs and now I'm looking to modify drawings using scripts uploaded to the Design Automation API. What I need to do is add part numbers and some other data generated by the app to the drawings. I have the following script I've managed to get working which is a very basic version of what I need to achieve.
; Add a label to a drawing
-mtext 0,300 400,310 App data
Tag No: P1234567
Created: 29/09/16
; Define Attribute
-attdef
i
P1234567
tag
-
0,200
10
0
; end
This script adds an MTEXT and ATTDEF to a drawing with a bit of basic data. What I want to do is position the labels at the bottom right of the drawing.
Is it possible to get the position of the drawing from somewhere so the script can figure out where the bottom right is? Ideally it needs to work no matter where the creator has positioned the drawing.
Bonus points: I'd also like to put this data into the drawing metadata somehow, would this be beneficial and how would be the best way to achieve this?
Thanks in advance.
If you would still like to do it in Modelspace, and you can control the drawings, it is possible to achieve this by finding the position of blocks with specific names.
Example: http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/find-a-block-and-get-it-s-insertion-point/m-p/3309261#M302014
I'm an environmental engineer using TecPlot to plot come charts with some input data, let me explain my problem.
I'm studying the evolution of a river bed with a Fortran code which I wrote. As a output the code gives a detailed stratigraphy going some centimeters under the soils surface. Basically the output file looks like this:
0.03500000000 -0.18093000000 -0.17093000000 -0.16093000000 -0.15093000000 ...
0.10500000000 -0.18100000000 -0.17100000000 -0.16100000000 -0.15100000000 ...
0.17500000000 -0.18107000000 -0.17107000000 -0.16107000000 -0.15107000000 ...
0.24500000000 ...
and so on.
The first column is the x variable (horizontal evolution) and has 200 data.
The other columns are the evolution on the vertical coordinate.
So basically for each line we have, starting from the second colon, an horizontal line drawn thanks to 400 values.
For example if I plot the entire first column with the entire first row what I get is just a line on the plot.
For each time step my Fortran code create an output file which gives a plot with all the substrate lines.
What I want to do, and I really don't know how to do it, is animating this plots in order to have, for each time step of the animation, the ENTIRE plot with ALL THE LINES.
What I've done in TecPlot so far is:
1) import all the output files
2) put them in the XY Line plot of TecPlot using one zone for each output file I have (file 1 -> 1:ZONE001, file 2 -> 2:ZONE001, file 3 -> 3:ZONE001 and so on)
3) trying to turn them into contour plot (no results)
3.2) trying to animate them with XY Line plot animation (too bad, it animates every single line...)
I hope that I've been enough thorough to let you helping me.
I would appreciate each contribution and I thank You for each -even short, small- answer.
Best regards
Assuming you have already loaded the file, and have multiple zones. you can animate the mappings by Animate -> Mappings.., As far as
trying to animate them with XY Line plot animation (too bad, it animates every single line...)
is concerned, you need Map Skip value more than 1, to skip the mappings (lines). The animation can be saved as video or image sequences from the same dialogue box, by pressing the small video button besides the play rewind and forward buttons enter image description here