AutoCAD .NET :: Accessing Entities On Paperspace Layouts

Dec 13, 2012

I'm trying to rewrite some old VBA code into VB.net (which I'm not even Novice level yet), and I'm stumped on what would be a fairly simple principle (in VBA)..
 
For Each BlockDef in ThisDrawing.blocks If Left(BlockDef.name, 12) = "*Paper_Space" then Select Case True Case BlockDef.Layout.Name Like "*Test*" blah blah End Select End IfNext
Essentially conditional manipulation of paperspace elements depending on the layout name.

 The following fragment allows me to recurse through entities in paperspace, but I've no idea which layout tab..
 
Dim BlkPaperSpc As BlockTableRecord = ScanTrans.GetObject(BlkTab _(BlockTableRecord.PaperSpace), OpenMode.ForWrite)For Each AcObjId As ObjectId In BlkPaperSpc Dim PspaceObj As String = AcObjId.ObjectClass.NameNext
 
What I need to do is to be able to identify a type of object (a table), confirm it's location, delete it and replace it with another one, depending on which layout tab it's on.
 
ACad, MEP, 3DS Max
Windows 7x64
X5482 @3.2Ghz 8Gb Ram
Quadro FX1700

View 2 Replies


ADVERTISEMENT

AutoCad :: Dashed Line In Paperspace Layouts

Feb 21, 2013

i have a bunch of sheets set up, and you can see a white rectangle with a shadow that i guess represents my page, and then in this page there's a dashed rectangle that i'm guessing has something to do with margins or something. i would like to turn this dashed rectangle off, if possible.

secondly, my sheets are set up for 11x17.. i was given a title block drawing to use. the title block was drawn in modelspace at 11x17. i copied it into the sheet and it seems to be the right size. there's an 11x17 rectangle that the titleblock sits in, and i'd like to line this up with the actual page (to make sure the titleblock is in the right spot).. however i can't seem to snap to the corners of the white page with the shadow.

View 6 Replies View Related

AutoCad :: Paperspace Layouts Switching To Portrait?

Mar 2, 2010

We have a huge vault of old CAD drawings and the issue that we keep running into is that once some of these drawings are plotted and the drawings is re-saved the paper space layouts are flipping from landscape to portrait ignoring the default plot settings.

So we end up having to go to each paper space tab and individually switch each page back to landscape and then save, after that the drawings is usually good and won't repeat the problem but it's a real hassle as some of these drawings have a few dozen pages.

Is there any way to remedy this from happening or at the very least is there a way to select all the paperspace tabs and switch the page orientaion of all of them in one shot? I'm at my wits end trying to figure out something that to me seems as though it should be much easier, i.e. highlighting all the tabs and changing the settings for the bunch but alas CAD does not allow this.

View 8 Replies View Related

Revit :: Turn Off All Section Tags For Drawings Referring To All Sketch Layouts In Construction Document Layouts?

Feb 23, 2012

Is there a way to turn off all section tags for drawings refering to all Sketch Layouts in all the Construction Document Layouts?

View 4 Replies View Related

AutoCAD .NET :: Accessing Variables

Dec 1, 2013

Am I able to access and read and write to the file holding the variables used in the parameters-manager's palette.  Ideally, I want to read the value held for an action-parameter, do some math using C, and write the result back to the file as a user-parameter which may be seen in the parameters-manager's palette.

View 2 Replies View Related

AutoCAD Civil 3D :: Accessing TIN Surface?

Sep 19, 2013

I'm trying to write a plug-in that involves operations with TIN surfaces. I tried to follow the example from the Developer's guide just to see if I could get accessing a TIN surface to work, but without success, and now I'm stumped.

Here's my code, which is supposed prompt the user to pick a surface, and then simply spit out the name of the surface that was selected:

Imports System
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.Geometry
Imports Autodesk.AutoCAD.EditorInput

[code]....

The plug-in is loading just fine and the initial prompt comes up, but whenever I actually select a surface after being prompted, I get a fatal error that causes AutoCAD to close.

View 3 Replies View Related

AutoCAD VB :: Accessing Viewport Properties

Jul 24, 2012

I am trying to have access to the property Custom scale of the Viewport object and trigger a piece of code as soon as I pick the Viewport and change the  zoom / Custom scale property.

View 2 Replies View Related

AutoCAD .NET :: Accessing Database Tables

Sep 21, 2011

I'm having a problem accessing data manager tables in the 2011 version.  My C# .NET code worked fine with 2010.  Here is a sample of the 2010 code that works, but returns zero length tables in 2011.

C#

ProjectPartCollection oPP = PlantApplication.CurrentProject.ProjectParts;
PlantProject oPProj = PlantApplication.CurrentProject;
Project oProj = oPP["PnId"];
try
{
//get ACAD data table
[code].......               

The last two lines fail to object any meaningful data in 2011.  In 2010, I would have all the table rows and could access tags and asset information. 

View 2 Replies View Related

AutoCAD Map 3D :: Accessing Topology Data

Jul 20, 2011

I have successfully created and defined a topolgy in Map 3D using a Visual Lisp routine that I cobbled together from CREATE.LSP. What I'd really like to do is be able to access that data and create closed polylines and centroids without going through the menu interface. The only documentation that I've been able to find is the Mapping Commands section of the Help file.

I found several commands, but they rely on user input to work. I might be able to work around this by typing a dash before the command line to suppress dialog boxes except for the fact that MAPCLPLINE does not respond to this method.

I noticed in CREATE.LSP that there was a TPM_MTNBUILD command that (apparently) was used to build the topology. Are there similar commands that I just haven't found yet?

View 2 Replies View Related

AutoCAD .NET :: Accessing Tool Bars / Buttons

Oct 6, 2011

I'm setting up some custom toolbars and that's no problem, but what I'd like to do is have one of the buttons be a toggle, so the icon changes depending on what state it is in.  I'm just having a bit of trouble figuring out how I find those buttons programatically from within C#. I've included Autodesk.Autocad.Customization which gives me the Toolbar, Tool bar button, etc classes, but I don't know how to find the existing toolbars from the running session of AutoCAD.

View 9 Replies View Related

AutoCAD VB :: Accessing And Iterating Selection Sets

Jul 18, 2012

I have already a Selection Set called objSS. All the objects in this Set are Multi Text, so I am wondering how is possible to have access to the property Text Height of these objects inside the Set in order to change the value of this property. I have created a variable as  AcadMText but is not possible for me to loaded it with any item from objSS.

View 3 Replies View Related

AutoCAD 2013 :: Big Lag Accessing The File Menu

Mar 3, 2013

I have a problem with our new 2013 Theres a long time delay before the File menu wether you hover over it or click on the file button.  Same if you use the Autodesk top left button

All the others act as expected i.e. edit, view, insert etc

This is really causing a loss of productivity through the time delay and extreme frustration waiting for it to click in

View 3 Replies View Related

AutoCad :: Accessing .ctb Plot Settings In 2013?

May 17, 2012

Where do i set my ctb settings in 2013?

View 3 Replies View Related

AutoCAD Inventor :: Accessing A Parts List?

Nov 15, 2011

We have written a VB6 program for non-Inventor users that uses the Autodesk Inventor Object Library from an install of the Inventor Viewer 2011-2012.  The program collects drawing sets from a VaultMirror folder exported from the actual Inventor vault.  In addition, the program exports assembly parts to a formatted Excel file for purchasing. 

We thought that it worked fine but, have recently found an issue: the program reads and exports ALL items referenced in an assembly, not just items in the parts list.  For a particular assembly that I am using to test with, there are seven items in the parts list but, 23 parts referenced in total in the assembly.  So, we get an Excel export with 23 + line items and when plotting to pdf, get 23 pdf files instead of the seven that should be created.

We are using the ApprenticeServerComponent to open the file objects but, I can't find a parts list.  I have reviewed a number of posted examples of accesing parts lists and opening ApprenticeServerDrawingDocument objects but, nothing seems to work.  It is like I don't have access to all of the object types needed to make it happen.

Should I be trying to open an iam or idw to access the parts list?

Are there any very basic code examples available of accessing a parts list?

View 1 Replies View Related

AutoCAD Inventor :: IAssembly - Accessing Part Parameters

Jul 13, 2012

How we can access the part parameters after hitting create iAssembly. do I need to make i parts first and then bring them to an assembly and make an iAssembly??

View 5 Replies View Related

AutoCAD .NET :: Programmatically Accessing Pipe Data In C3D 2013?

Nov 19, 2012

In C3D (2012 or 2013), the Pipe Properties Dialog reports "Hydraulic Properties" of a pipe section. Through .Net (C#), I can access part data such as Hydraulic gradient etc but I cannot seem to find any reference to three members I see on the mentioned dialog aka "Flow Rate", "Junction loss" and "Return period".

I have "fudged" a term "Flow Rate" into the pipe part parameter definition file (AeccPartParamCfg.xml) and can access that programmatically but I think this "Flow Rate" in the Pipe Properties Dialog" is part of the Auotcad database and I cannot seem to find a route to get hold of it.

View 2 Replies View Related

AutoCAD Inventor :: Accessing Inertial Properties Using ILogic?

Feb 3, 2011

iLogic has the capabilities to access the physical properties of part files such as mass / area / volume etc. ilogic syntax to read the inertial properties of the part file such as Global Ixx / Iyy / Izz??

I can find it in the API help, but i don't really want to write it as separate code, just want to simply access it through iLogic interface.

Dell Precision M6400 - C2D 2.66 / 8gb / Quadro FX3700M / Win 7 Pro x64

View 4 Replies View Related

AutoCAD Civil 3D :: Programmatically Accessing Pipe Data

Nov 20, 2012

In C3D (2012 or 2013), the Pipe Properties Dialog reports "Hydraulic Properties" of a pipe section. Through .Net (C#), I can access part data such as Hydraulic gradient etc but I cannot seem to find any reference to three members I see on the mentioned dialog aka "Flow Rate", "Junction loss" and "Return period".

I have "fudged" a term "Flow Rate" into the pipe part parameter definition file (AeccPartParamCfg.xml) and can access that programmatically but I think this "Flow Rate" in the Pipe Properties Dialog" is part of the Auotcad database and I cannot seem to find a route to get hold of it.

View 9 Replies View Related

AutoCAD Inventor :: Accessing Bolted Connections Through ILogic?

Nov 27, 2012

I'm currently creating a program to replace all fasteners in an assembly with there Metric / Imperial opposites. My program works and I've created a log file for any issues that do come up.

My question now is: 

Is there any way to manipulate bolted connections through the API? Or is this not supported yet?

I cannot seem to find anything to do with them. It's strange though as my program creates an error log for the Lock Washers in the Bolted Connection (which it was struggling with previously anyways), but shows the other fasteners as being successful.

View 4 Replies View Related

AutoCAD Inventor :: Accessing Features From A Part In An Assembly

Aug 22, 2012

I'm crating a macro wich would allow me to select multiple parts in an assembly and then calculate the length of each part. The parts are tubes wich are made of a sinlge sweep.

I started from the example truesweeplength, and built from there.

Now my problem is accessing the sweepfeature from the assembly.

In the part enviroment i use this:

Dim oDoc As PartDocument
Dim oDef As PartComponentDefinition
Dim osweepcount As Long  
Set oDoc = ThisApplication.ActiveDocument
Set oDef = oDoc.ComponentDefinition
osweepcount = oDef.Features.SweepFeatures.Count

The sweepcount is simply to check how many sweep features are in the part.

This works fine in part level.Now from assembly level I first create an obecjtcollection from all the parts I selected

Set oOccurrences = ThisApplication.TransientObjects.CreateObjectCollection

Then I try to acces the first occurence

oDoc.SelectSet.Item(1)

But then I'm stuck. I cant find the way to acess the features of the selected part.

View 6 Replies View Related

AutoCAD Inventor :: Accessing A Parameter 3 Sub-assemblies Deep?

Oct 28, 2013

I'm trying to access a paramter thats in a sub-assemby 3 sub-assemby deep, is this possible?

I have tried a few thigns incluiding this, but it doesn't work.

Parameter(MakePath("MegaStalls:1", MakePath("Stall_1", MakePath("Pilaster:1", "xPilaster:1"))), "pilasterHeight")

View 6 Replies View Related

AutoCAD Inventor :: Windows 8.1 Accessing Content Center

Dec 12, 2013

I have installed Inventor 2014 and Revit 2014 on to Windows 8.1 64 Bit.The install went fine.

The only problem I have struck is that for instant if I create a new Assembly and want to open the Content Center from  Assemble - Place - Place from Content Center. Nothing happens when I go through this path way, there's no error, you know it's trying as the harddrive light is flashing away rapidly for a few minutes each time you ask for it to open.

What I have tired so far is to install service pack 1 and update 1 to service pack 1, neither have made a difference.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Accessing Data From An Object

Jun 19, 2013

How to access the information stored with an AcDbScale object using Visual Lisp.  I can convert the vla-object to an ename and then use association codes to extract the data, but surely there's an easier, more direct alternative.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Accessing Point Clouds?

Apr 19, 2012

I have a small app to create, related to point clouds.

I know VisualLISP pretty well, definitely well enough to accomplish the task.but...I can't figure out how to retrieve information on the point cloud's clipbox using lisp.

I know a little VB.NET; I took a one-semester class at the JC, two years ago. It's going to take time for me to get ramped up enough with VB to do this job, so I don't really want you to tell me the only way to get to the clipbox is through vb.

way to retrieve and modify a point cloud's clipbox with VisualLISP?

View 3 Replies View Related

AutoCAD Inventor :: Preserve Functions In IProperties When Accessing With VBA Script

Dec 3, 2012

I made a simple dialog to access some of the iproperties. This is quite handy when working on a drawing of a part, but there is one flaw with this script. If the part's description has a function referencing the parts dimensions for instance, when my script gets the description it gets the plain text and not the formula. Meaning if the part's description is "=<d0> X <d1> X <d2>" and appears as "1 X 2 X 3" the script will get "1 X 2 X 3" and when it resaves the description it will over write the formula with plain text.

Is it possible to get the formula so my script could display that for editing instead of the plain text?

Below is a part of the code I'm using and it's the standard code I've seen for retreiving ipropterties.

Dim invDoc As Document Set invDoc = ThisApplication.Documents.ItemByName(GetToken(PartList.Value, 3, Chr(1))) Dim invDesignInfo As PropertySet Set invDesignInfo = invDoc.PropertySets.Item("Design Tracking Properties") Dim invProperty(1 To 4) As Property Set invProperty(1) = invDesignInfo.Item("Part Number") partnumber.Value = invProperty(1).Value Set invProperty(2) = invDesignInfo.Item("Description") description.Value = invProperty(2).Value

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Accessing Hatch Area From ActiveX

Mar 30, 2007

Hatch objects: Note To access this property, use the IAcadHatch2 interface.How can I access the Object.Area of an AutoCAD hatch. AutoCAD 2006 has properties that can be assigned to Fields so why can't I find the object att- area in any lisp vars?

View 7 Replies View Related

AutoCAD Architecture :: 2013 - Accessing Wall / Window And Door Pallet?

Jun 5, 2012

In Autocad Architectural 2012 if I typed 'wall' I would get several options for walls.  If I selected 'A' (add) it would bring up the properties panel and draw the necessary walls.  This does not work in Architectural 2013.  Where to I access the wall/window/door pallet?

View 4 Replies View Related

AutoCad :: DXF And Surface Entities?

Sep 23, 2011

looking for a way to read in the DXF data for a surface entity in AutoCAD2012. There's plenty on reading in simple objects (e.g. 3DFace, Points, etc.) but nothing on surfaces. The data itself is also not as intuitive as I would have hoped. The DXF reference PDF from AutoDesk shows 7 possible unique entries and the data I need is most likely stored in the proprietary data. So, in short I know where it is but how can I read it?

View 7 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Dynamic Block - Accessing Action Parameters

Jun 3, 2013

I have a new project coming up where I need to write some simple programs to access the dynamic action parameters in some existing dynamic blocks.I have viewed what I could find on AU, but I still ave not found anything relating in-depth to dynamic blocks. 

Any good Tutorials, Articles, or White Papers, on  working with dynamic blocks with autolisp/ vlisp?  The main function is to access a parameter and change it by entering a numeric value, updating the block. say from a linear/polar stretch, or a linear/ polar move.

View 4 Replies View Related

AutoCAD .NET :: How To Get ObjectIdCollection Of All Entities In A Certain Layer

May 22, 2012

How could I get the ObjectIdCollection of all entities (points, polyline) in a certain layer?

I am using the following code at this moment.
 
private ObjectIdCollection GetEntitiesOnLayer(string layerName)
{
Editor ed = doc.Editor;
TypedValue[] tvs = new TypedValue[1] { new TypedValue((int)DxfCode.LayerName, layerName) };
SelectionFilter sf = new SelectionFilter(tvs);
PromptSelectionResult psr = ed.SelectAll(sf);

[code]....

But it seems the function fetches more ObjectId than I expected.For example, if I draw 3 points and 2 polylines in "A" layer.

ObjectIdCollection obc = GetEntitiesOnLayer("A");

int i = obc.Count;

I was expecting i to be 5 (3 points and 2 polylines), but i seems to be more than 5.

View 2 Replies View Related

AutoCAD .NET :: Dynamic Preview Of Entities

Sep 8, 2013

I have the dialog window with the settings for entities graphical appearance used in my plugin.

My goal is to create the same preview as AutoCAD dimension style manager dialog has, the dynamic thumbnail of the entities while user changes the settings in dialog.

Probably one option is to create temporary block (created based on data from settings dialog) and then use BlockTableRecord.PreviewIcon, but I am not sure if there is some other way.

View 2 Replies View Related







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