I want to clone a polyline3d and set all vertices Z to 0.0 and use that one in my program. I don't want to add it to the database, just use it in memory and then dispose it. I know how to access all vertices in a polyline3d that exists in the database using a transaction, but this will not work with my cloned polyline3d in memory.
Here's part of my
Dim acDoc As Document = DocumentManager.MdiActiveDocument Dim acCurDb As Database = acDoc.Database Using acTrans As Transaction = acCurDb.TransactionManager.StartTransaction() Dim idArray As ObjectId() = sSet.GetObjectIds() For Each id In idArray Dim entity As Entity = [code]........
i have a program to change the polyline3d. Something like
try{ using (tr) { Polyline3d poly3d = (Polyline3d)tr.GetObject(oid, OpenMode.ForWrite); ObjectId[] verts = poly3d.Cast<ObjectId>().ToArray(); for (int i = 0; i <
[Code]...
After that, the polyline3d changes perfectly. On the screen i can see the change. But when i run the command 3dorbit, then i see the polyline3d before the change.
You can see it on the Pictures
When i save the drawing and open it again, everthing is all right. Where the error is?
How do I look at the objectIDs of the entities being deepcloned. Apparently it is something like this but I must have something wrong with
For Each kvp As KeyValuePair(Of String, ArrayList) In e.IdMapping as there are no items in the collection.
Public Sub db_BeginDeepClone(ByVal sender As Object, ByVal e As _ Autodesk.AutoCAD.DatabaseServices.IdMappingEventArgs) For Each kvp As KeyValuePair(Of String, ArrayList) In e.IdMapping Console.WriteLine("Key = {0}, Value = {1}", kvp.Key, kvp.Value) Next kvp End Sub
When using object snap feature, if a particular point has multiple roles, by which I mean it could be {endpoint, node point, circle, intersection, etc.} at the same time, is there a way to toggle the snap point selection?
mt.png
For example, does there existKey or key combination 1: Change the object snap mode to “single” amongst all enabled modes. Key or key combination 2: Iterate one by one through all available modes.
I'm a newbie in dotnet and want to now if is possible to iterate through items of a block reference.
My problem is the following : I explode a block reference in dotnet (it works well) and I want to change the items layer that compose the bloc reference. It's the reason why i need to browse items of this block.
I want to iterate through the Image Dictionary and Connect into the Raster ImageDef Properties.
I want to be able to modify and fix missing Raster Images.
How to get this code sorted out.
For Each myObjID As ObjectId In myModelSpace Dim myEnt As Entity = myObjID.GetObject(OpenMode.ForRead) If TypeOf myEnt Is Image Then Dim myRasterImg As RasterImage Dim myRasterImgDef As RasterImageDef 'Open The Dictionary Dim ImgDict As ObjectId = RasterImageDef.GetImageDictionary(DatabaseIn) For Each dictEntry In ImgDict NextEnd If
Code snippet to show me how to iterate through the selected text (not the frame!, not the words, only the selected chars) and make any change on the characterAttributes (size, color, etc.)?
In the property "app.activeDocument.selection" usually the selected objects are stored as an array. Now when I select characters in a textframe (or TextPath, whatever) there is a [Textrange] in it. I already tried some combinations like this snippet underneath but I still get errors, that selectedChars[i] is undefined.I'm on Illustrator CS4, Mac OS X, Javascript
var selectedChars = app.activeDocument.selection.characters; for (i = 0; i < selectedChars.length; i++ ){ selectedChars[i].characterAttributes.fillColor = myNewCMYKColor;
I am trying to iterate through objects in a layer and if the object satisfy a condition, I want to remove it.
Problem is that from what I suspect, if I use a "for loop" then when I remove an element, the initial length of the loop becomes invalid by removing the element. So what I would need is to iterate through objects in another matter and I am clueless.
One more questions is if there might be a CharacterAttribute who belongs no characterstyle? Can I iterate charaterstyles to know all the font, bold .. information for all teh textranges?
I know how to get/set attribute within loop at block's AttributeCollection.But I'm wonder if I can set value for specified attribute without loop. Or I always have to iterate on each attribute in block's AttributeCollection?
I have a portion of my routine below. Basically I need the user to continue to loop through the command. They are picking Circles or blocks in the drawing and I get the insertion point, then insert a new block. However, whenever they try and use a transparent zoom or pan to move around the drawing when the promptentityresult is hit, it zooms back to the original location.
Here is a code....
< CommandMethod("getpnt", CommandFlags.Session)> _ Sub findpnt() Dim cnt AsInteger = 0 Dim NEWPNT AsPoint3d = GetInsPoint() While cnt < 3
I have a sphere body whose material is partly removed by a boolen subtraction with another sphere. When I query the EdgeLoop of sphere for Outer edge loop using function InvEdgeLoopPtr::GetIsOuterEdgeLoop(), I always get a value of VARIANT_TRUE. check for the inner and outer loop of a sphere? use the attached file for reference.
Have sketched the geometry for an 18 tooth circular sawblade. However I have had difficulty applying the close loop function. As a result am not yet able to extrude the saw blade. What to do to implement close loop?
I know we can do this easily in AutoCAD Electrical, but I could not find any command or feature in AutoCAD to set up this function so that when two lines are intersected, the cross point will become a dot or loop.
Upon setting up a drawing for plotting (the problem is not printer specific) the "Print Preview" gets stuck in a loop where I am unable to exit if I choose to cancel or alter the settings. I am forced to go ahead and send the plot. If iI immediately go back and run the PLOT command again nothing happens... no dialog box, no error nothing. I must then go to any other open dwg, do a save, and then go back to the original dwg. Then the PLOT command will again work, however, still getting stuck in the preview loop.
I am asking the user to select points and insert a block at each of the selected points. On user exit from the point selection I draw a polyline connecting the blocks.
However, I cannot get the already inserted blocks to display until I complete the insertion of all blocks. How do I go about getting them to display as soon as they are inserted? The code segment below is inside a transaction and nothing appears on the screen till this transaction is committed' Pt(0 to 2) is defined as a double and is returned when the user selects a point with function
SelectPoint Do While SelectPoint(Pt) = True Dim MyPoint3D As New Point3d(Pt(0), Pt(1), Pt(2)) InsertBlockAtPoint(MyPoint3D, myTransManager, strBID, _ myBlockTable, CurrentBlockSpace, dwg, True)' strBID is a previously populated structure containing data about the block insertion details and Xdata to be added to the block reference Dim MyPolyPoint3D As New Point3d(Pt(0), Pt(1), 0) myPoints.Add(MyPolyPoint3D)' myPoints is a data set used to plot the polyline
I am trying to create a logic rule to replace the model reference in a idw file and then save as using the new file reference name. I am able to do this for individual files or components within an assembly file.
However what I would like is to check through all files of a certain type (for example ipt with filenames beginning "SSUA" ) in a specific folder.
The following code from Curtis Waguespack works well for individual selected files but I would like to take it a stage further with the above parameters.
Dim oDoc as DocumentoDoc = ThisDoc.DocumentDim oRefFile As FileDescriptorDim oOrigRefName As Object For Each oRefFile In oDoc.file.ReferencedFileDescriptors'get the full file path to the original internal referencesoOrigRefName = oRefFile.FullFileName'present a File Selection dialogDim oFileDlg As inventor.FileDialog = NothingInventorVb.Application.CreateFileDialog(oFileDlg)oFileDlg.InitialDirectory [Code]........
I have VB code that loops through and utilizes Excel data to pick which file(s) to open, update, and close. Then it opens the appropriate .idw file, updates it and saves it as a .pdf.
and that writes the file to my desktop as a .pdf.
However, as the loop runs over and over, it will find another data set that is the same A60 type, so it will want to save OVER that .pdf it's already created.
How do I go about having a variable filename? Something where it would add a _01 _02 _03 (or similar) to the end of the filename (i.e. A60_01.pdf, A60_02.pdf).
I am currently designing a heat exchanger and want to adjust the number of water channel using iLogic. The number of channels to be active is based on the channel dimensions, and is calculated in my excel spreadsheet, but up to a maximum of 19. This is stored in the parameter "no_channel". Each channel is a seperate feature (extrusion) and named from "Channel 1" though "Channel 19".
My idea of doing this automation was to have iLogic suppress all the features, and then doing a closed loop to unsuppres the features I want active:
Feature.IsActive("Channel 1") = FalseFeature.IsActive("Channel 2") = False...Feature.IsActive("Channel 19") = FalseFor i = 1 To no_channelFeature.IsActive("Channel"(i)) = TrueNext
However, this gives me the following error:
Error in rule: Number of channels, in document: Radiator fin side.ipt
Feature.IsActive: No feature found with the name: "h".
I am have trouble trying to figure a couple of things in the following code.
First - in the IF statement if "SD" is >= ask "Specify LAST strata number". How do I add nil? Second - After I "Specify the LAST strata number", How do I stop the loop?
I have been using AutoCAD mainly doing shopfitting and construction drawings; occasional 3D presentations. Therefore I am clueless as to how to start drawing something like e.g. the flexi-curvey loop of a flip flop in 3D.
I'm desperate to know how should i heal the errors for loop orientation issues. I had imported the .stp file into inventor so i can do stress analysis. After imported the file and enter into repair environment, after i find the errors shown 9 errors in loop orientation issues.
But I can't apply it because the site states my account has not been activated. It places me into a loop to resend to my email to activate my account. I'm in a never ending loop. There seems to be a glitch to the site.