AutoCAD Inventor :: Divide Segment Equally With A Range In Visual Basic

Jan 15, 2013

How do you divide a segment equally with a range in visual basic?

example-

length is 144 in

range- 7.5 - 9in

answer- (18) at (range 8 in)

like to know how to do this in Visual Basic so I can create some rules and forms in iLogic

View 3 Replies


ADVERTISEMENT

AutoCAD Inventor :: Change Title Block Using Visual Basic

Jan 2, 2013

I am trying to change the title block of the active sheet using visual basic.  I realize this can be done using a snippet in iLogic, but I am creating an external .dll file using Visual Studio.

I have tried...

ThisDoc.Document.ActiveSheet.TitleBlock.Definition = "Title Block Name"

ThisDoc.Document.ActiveSheet.TitleBlock.Definition.Name = "Title Block Name" (This changes the name of the title block in the browser but doesnt swap it out.)

Call ThisDoc.Document.ActiveSheet.TitleBlock.Definition("Title Block Name")

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Divide 3D Poly Line

Sep 21, 2011

I have little Autolisp experience, what I need is a lisp routine that will divide a 3D Poly line to say about 1000 points and add index to the points from the start of the line to the end of the line. It is very important that the index be from the start to the end of the line, because we extract the info to excel and then use the x,y and z co-ordinate of the points on our hydraulic analysis  program. We need to have the index and the x, y and z co-ordinates on our Excel sheet sorted by index and not by x, y and z.

To be more clear the 3D poly is a pipeline profile so we need to have the points in order by index and not by x, y and z.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Divide And Measure Between Polyline

Aug 1, 2012

do you know command or lisp that will do new pollyline between two polyline on 1/3 or 1/4 space between them.

I need sommething that would be faster,know is use measure on pollilines then i draw between horizontall polylines on verteks or point new pollyline and then divide it on 4 or 3 parts.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Divide With Blocks And Keep Attributes?

Mar 1, 2013

I need a function that will allow me to do a "divide" with blocks but I need the single attribute to remain intact.

I need the blocks to align with object and keep the attribute. I did get it to work with constants but the function that I need to run next failed because of the constant. My variable is preset and locked.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Divide Multiple Lines

Apr 25, 2013

I need to divide thousands of lines into half, but AutoCAD divide command can only allow you to select one line at a time.Is there any way we can divide multiple lines  at once.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Add Segment To A Leader?

May 11, 2012

I've managed to retrieve the important points of a leader with the following

(setq edata (entget (entlast)))
(setq leader? (cdr (assoc 0 edata)))
(cond
((= leader? "LEADER")())
(T(setq edata (cdr (entget (car (entsel "
Pick a leader: "))))))
)

[code].....

What I'd like to do is add a horizontal segment of a known length to the leader, obviously based on the last point.  I have to assume that the user is in the appropriate UCS for this, but I can trouble shoot for that later.

subst old list iwth a new list and apply it to the entity somehow?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Divide Big Region On Lines Intersections

Oct 2, 2013

I need a easy way to create a lot of small regions, or divide a big region in lines intersections, or a fast way to pick points inside objects.

Its like that:

imagine that you do 100 horizontal lines and then 100 vertical lines.  Now you have 10.000 squares. i need a fast way to make a region in each one of then.

So its too much trouble to pick points inside each one of then. i need to divide a big region or a fast way to create Plines or objects with the little squares. And i cant use array because they aren t regular squares.

Its something that i do often, its not a one time thing. This is necessary in structure analysis modeling, i export this dwg to a dxf file, that i use on a finite element program.

i never did a lisp before.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Vertices Of A Polyline Segment

Dec 18, 2011

I have to intersect polylines "POLYLINE" and "LWPOLINE" with a line and get all the angles of all segments of the polyline that are intersected.

To do this I used a loop that monitors all the vertices of each polyline to find the two vertices of the polyline segment that intersects the line. Unfortunately, these polylines have thousands of vertices and the processing done in this way takes too long.

With the vlax-curve-getClosestPointTo I could very quickly find the vertex of the polyline closest to that intersected with the line, but I need to find the other vertex of the polyline segment to determine the angle of this.

Another question: is there a quick function that returns the exact point of intersection of two curves (e.g. A line and a polyline, or a line and a circle?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Divide Spaces With Max Gap - Draw Lines Between 2 Points

Feb 6, 2012

I have to put some trusts between two beam. It sounds easy but i'm unable to handle the divide and round off commands in the lisp. See attachement also.

To draw my trust between the 2 beams, what I normally do, is that I manually take the distance between the two points say it's 10 000 and wrote it down. Then I divide it by my max gap, say 1200, it is the max space between trust.

10 000/1200 = 8.333333 that's the result of how much trust and space between them that i'll need, 8 trusts, 9 spaces between the 2 beams. (That is what I'm unable to do in the lisp, tell it to round off 8.333 to 9 and use 9 for divide command)

What I manually do at this point to draw these trust is that I must create a temporarly line between the 2 beams, perpendicularly to these and divide it by 9.

It gives me 8 cross (or point) to draw my trusts. All this is long to do manually because I have many bay in building and I have to redo this operation for every the bay.

So, what I would like the lisp to ask is:

Specify distance between two beams (Between where and where) :

Specify the lenght of the trust :

Specify max gap: I would like to answer a number here, say like 1200 max

(The lisp should draw the lines on the current layer, color and linetype of the current layer and not draw a line at the beginning and at the end because that's where my Beams are. I hoped you understand, see attachement.

Should also have something that handle a ESCAPE hit or cancel, something like this:
 
(defun trap1 (errmsg) (command "_.undo" "_end") ; undo end (setvar "osmode" oldsnap) ; restore variables (setvar "cmdecho" 1) ; enable cmdecho (setq *error* temperr) ; restore old error handler (prompt "

[Code] ....

View 4 Replies View Related

AutoCAD Inventor :: How To Create Symmetric Pattern Of Components Equally Mid Plane

Sep 14, 2009

I'm using Inventor 2009.

Imagine a flat, rectangular plate with origin plains located symmetrically down the middle of the plate. Place a component, say a small cube, and constrain it to the face of the plate and the origin planes so that it too is symmetrically located. I now wish to pattern this cube about the midplane and create a total of five instances. I select "Pattern Component" in assembly mode and select the cube. For direction 1, I put in two instances and select an edge of the plate so that the pattern is taken to the left of the midplane. For direction 2, I again select two instances but pick an edge so that the pattern is taken to the right of the midplane. I now should have a total of 5 cubes but I don't. I have 6.

The second pattern is actually a repeating pattern of the first which, in the end, creates too many cubes. Visually, it looks correct because the cubes are placed excatly on top of each other. Numercially, like in BOMS, it is not correct.

Is there a way to avoid these duplications?

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Angle Of Polyline Segment At Specified Point

Mar 19, 2013

I am writing a routine that will place a piece of text at a specified point along a polyline. My problem is to determine the angle for the text. It needs to be the same as the segment of the polyline that it falls on. Just can't get my head around how to get that angle?

I can get a list of the vertex point of the polyline, but how do I determine the segment the point falls on?

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Convert Ellipse Segment Into Spline Or Polyline

May 3, 2012

Our customer send us drawing with ellipse segments  into.

With Autocad 2008 I bought a plug-in call SplineConvert that did the job perfectly but not compatible with 2013.

Is there any plugin that could replace that tool  ?

Is there any standard ACAD command that could easily do this Job ?

I need a way to make 2 or 3 times per week  this converting on all ellipses of large and detail 2D drawings so no time to offset in and out all those .

I try also DXFOUT in R12 but all the spline are being converted into 3d  polyline making a huge files that froze my PC.

I also try FLATTEN but did not see how it work , the ellipse stay an ellipse.

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Place Aligned Dimensions On Each Segment Of Polyline?

Feb 6, 2006

Have Lisp to place aligned dimensions on each segment of a polyline?

I would use it for reinforcing bar detailing.

View 9 Replies View Related

AutoCAD VB :: Send Keystrokes Using Visual Basic 6?

May 20, 2011

I need to know the visual basic 6 code to allow me to send Keystrokes to AutoCAD using Visual Basic 6.

Using the onscreen keyboard works ok.

View 1 Replies View Related

AutoCAD .NET :: Draw Triangle In Segment Of Polyline In Segment Direction

Sep 9, 2012

I want to draw triangle in segment of polyline in segment direction.

I have target segment and center point of it:

  Polyline line = ...
  LineSegment3d centerSegment = line.GetLineSegmentAt(centerSegmentIndex);
  Point3d centerPosition = centerSegment.MidPoint;

I can find direction of this segment:

  Vector3d zaDirection = line.GetLineSegmentAt(centerSegmentIndex).Direction;

Next, I create list of points:

  List<Point3d> points = new List<Point3d>();
  points.Add(centerPosition);
  points.Add(centerPosition.Add(new Vector3d(ZASize, +ZASize, 0)));
  points.Add(centerPosition.Add(new Vector3d(ZASize, -ZASize, 0)));

And draw it:

wd.Geometry.Polygon(new Point3dCollection(points.ToArray()));

Ok, I have triangle but... it's not in segment direction, it's X-direction.

I try to rotate it:

points.Add(centerPosition.Add(new Vector3d(ZASize, +ZASize, 0)).RotateBy(0, zaDirection, centerPosition));

But it's not the same as I want.

How I can draw triangle by serment direction?

View 5 Replies View Related

AutoCAD VB :: Convert Lisp To Visual Basic Code?

Oct 1, 2013

can more easy convert lisp to visual basic code?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Segregate Closed Polylines In Drawing By Area Range?

Mar 21, 2013

I need to segregate closed polylines in my drawing by area range. Ideally, I would input the number of ranges I need.

Then somehow find the smallest and largest pline area to determine the range values (rounding up to a sensble number)

Then with the ranges determined the polylines would be segregated and moved to new layers.

I've been trying to hobble together pieces but with no joy.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Ultra-pipe (Drawing Name Versus Circuit ID And TML Range)

Sep 12, 2012

For those who are familiar with the Ultra-Pipe Program, when I open a drawing from Ultra-Pipethe title layer is updated by the kbupdate.lsp file and the drawing decription (title Layer) is updated with the Circuit ID and TML range.  Referencing the attached pdf, you can see that this would be misleading in some cases.  I need the description in the title block to be updated with the drawing name instead.

We have changed the default layer colors before in the kbupdate.lsp so I know it's not impossible.  I am 99% sure that the changes needed for the problem above would be in the same file.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: FAILSAFE Basic Block Insertion?

May 20, 2013

I need a function that accepts a block name as an argument and will insert the named block without fail no matter if the block was made to scale uniformly or not.

How can I determine if the block should be inserted like:

(command "-INSERT" blkn "0,0" 1 0)

or:

(command "-INSERT" blkn "0,0" 1 1 0)

View 8 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Divide One Radio Column Into Two Radio Columns?

Dec 16, 2013

I want to take a Radio Column with 10 Items and make two columns of 5 Items, so that onlu one of the ten radio buttons are selected. This is aide in spacing on the Dialog Box. I am trying not to re-write the whole program, just add a few options.

I tried to add another Radio_column, it seperates it, but its two separate sections.

:radio_column {label = "Side Elevation";
fixed_width = true;
fixed_height = true;

[Code]....

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Multiple DWG Files With Basic Set Of Commands In Script File

Jul 19, 2013

I can run the ACC fine on multiple DWG files with a basic set of commands in the script file.  But, when I try to load an AutoLISP/Visual LISP file and run it from inside the script file, it doesn't work. How to run a LISP file using the ACC?

View 1 Replies View Related

AutoCAD Civil 3D :: Flow Segment Label Using Total Flow Type Travel Time For Each Segment

Nov 27, 2012

Flow segment label using total Flow Type travel time for each segment:

C3D 2014 SP1
W7x64; i7 8gb; Radeon HD 5700
[URL]....

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Convert List Of Numbers To A Range Of Missing Numbers

Jul 18, 2013

I have subroutine that retrieves a list of detail numbers in a drawing. Sometimes there are missing numbers. I am looking to find a list of any missing numbers.

Example -

(setq List_DN (list 1 2 3 5 6 7 10 11 12 17))

Missing numbers are - 4,8,9,13,14,15,16

I would like a subroutine to take the List_DN are return the following missing numbers as text

(Get_Missing List_DN)
return
4,8-9,13-16

View 9 Replies View Related

CorelDRAW X3 :: Microsoft Visual Basic Errors Occurred During Load

Feb 24, 2012

I've just installed Corel Draw X3 and I'm trying to run a plug-in to control my plotter.  The plug-in is not in corel draw where it should be.  I think the plug-in is supposed to run through visual basic.  If I mouse down to visual basic in corel draw I get an error message that says "Microsoft Visual Basic errors occurred during load.  So I'm thinking the problem is with the visual basic program, but it was installed in the corel draw disc. I'm running Windows 7 if that makes any difference.

View 9 Replies View Related

CorelDRAW X6 :: Access Color Sample Tool From Macro / Visual Basic?

Nov 27, 2012

Is it possible yet to do this? I'd like to pick several points on the screen and get the color from each spot separately.Current System: i3 3.07ghz, 3gb ram, Windows 7 32 bit with all updates and X6

View 2 Replies View Related

AutoCAD Inventor :: Creating Wiring Segment

Jul 24, 2012

Another question about the Cable and Harness module.  When I am trying to create Segments, I can never select cylindrical features.  Using the Tube and Pipe module, I can select them no problem, but for some reason under Cable and Harness I cannot.

This is a huge pain for me for two reasons, all of our wire loops are cylindrical, and I am unable to place a segment off of an already existing Flexible Hose or other Electrical segment.

Is this a limitation of the Cable and Harness module, that you cannot place segments relative to a cylindrical feature?  

View 9 Replies View Related

Illustrator Scripting :: Pie Chart Slices Sizes Wrong Using Visual Basic Script

Jan 25, 2012

We have a Visual Basic Script that creates pie charts using Adobe Illustrator along with an internally created app called Chart Generator. An xml file that contains a markup for a set of pie charts is imported into Chart generator and by using Illustrator it generates all of the pie charts and saves them as individual eps files.
 
It was recently discovered that not all of the pie slices are proportioning correctly. In some cases a slice that is 10% of the pie appears larger than a slice that is 13% of the pie. We can’t determine a pattern that might be causing this issue. We think that the problem is in the Visual Basic coding.

View 3 Replies View Related

AutoCAD 2010 :: Open And Create A Drawing In 2012 From Visual Basic 2010

Jul 1, 2012

I'm doing a program in Visual Basic 2010. In one of the forms I put a button that when clicked must open AutoCAD 2012 and make a drawing in it. The user will decide where to save it.The steps are these:

1. I added the references Autodesk.AutoCAD.Interop and Autodesk.AutoCAD.Interop.Common to the Visual Basic Project. That's OK.

2. I wrote this in the heading of the form's

- Imports Autodesk.AutoCAD.Interop
-Imports Autodesk.AutoCAD.Interop.Common

3. In the event Click of the Button1 I put this:

    Dim acadApp As New AcadApplication 'Create an instance of an AutoCAD Application
    AcadApp.Application.Visible = True 'Show the instance of the AutoCAD Application
    Dim acadDoc As AcadDocument 'Create an intance of an AutoCAD Document
    acadDoc = acadApp.Documents.Open("C:Respaldo TesisDibujo2.dwg") 'Open a Document called Dibujo 2
    'Draw a line
    Dim PT1(2) As Double
[code].....

View 2 Replies View Related

AutoCAD Inventor :: Error Detected While Writing Segment?

Apr 3, 2013

I have been working for the last couple of hours "copying objects" into my part file.  I am creating composites from surface data that exists in other part files.  I now cannot save my part which I have renamed TEST.IPT for the purposes of this request.  This is a common workflow for me when I am recreating a part from multiple imported CATIA files.  (I know it is hard to guess withour providing the actual data.)

Problems encountered while saving the document.
Error(s) detected while writing segment PmDCSegment in database TEST.IPT
Error detected while saving object of type MIxTransactablePartition in TEST.IPT
Error detected while saving object of type MIxPartition in TEST.IPT
The attempted write operation did not succeed. Part file may be corrupt.
The database in TEST.IPT could not be saved

View 6 Replies View Related

AutoCAD Inventor :: Invalid Reference To Segment Object Used

Dec 10, 2012

I derived in a part and I am trying to use a sketch from it in my new part.

I am trying to revolve my sketch and when I do I get this error.

I am using a English version, and I cant read chinese at all.  Design doctor shows no errors, but this will not revolve. Tried Extruding and get the same error.  When I try to revolve, it shows a preview of my part correctly, but when I click apply in the revolve dialog, that is when I get this error.

The files are attached and here is a video of my steps. In the zip file, the -M8.ipt needs the EOF marker moved all the way to the bottom.

Windows 7 x64 -12 GB Ram
Intel i7-930 @ 3.60ghz
nVidia GTS 250 -1GB (Driver 301.42)
INV Pro R2013, SP1.1
Vault Basic 2013

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved