AutoCAD Inventor :: Model Custom Property To Sketch Symbol Definition
Sep 29, 2011
How would i insert the "variable name" of a custom iProp to a sketched symbol definition (in an idw)?
I can plonk the value of the iProp in no worries, but to make it "live" is a bit beyond me...
Sub WeldNote()On Error Resume NextDim oDoc As DrawingDocumentDim SketchedSym As SketchedSymbolDefinitionDim oNoteDef As SketchedSymbolDefinitionDim oDefSketch As SketchDim oTextbox As TextBoxDim SNewText As StringDim sNoteText As StringDim oReffedDoc As DocumentDim lReffedWeldType As Long'Err.ClearIf
I am trying to create a sketched symbol on the fly that has custom properties in it. I am also creating the custom properties on the fly. I need to get the actual expression for the property into the sketched symbol not just a value. I need this so that I can export the drawing as an autocad .dwg that has attributes in it.
What I would like to do is create a custom dialogue for each of 3 or 4 standard sketch symbols we use on a regular basis. I'd like to load 'suggsted' values out of an excel spreadsheet and allow the user to pick from them or enter in a custom text string if required. The values would then become part of the sketch symbol.
I've spent some time looking into iLogic rules and I think I've determined that they're not flexible enough to do what I want.
If I'm correct, it is possible (or a good idea) to do this using a VBA macro? I'm a little hesitant to go down the full blown add-in route. While I'm pretty confident I could work it out.
Just installed 2013 Pro x64 and I'm doing a little testing. Using Tube and Pipe, I created a few mock pipe runs which are named according to a unique line number. When clicking on the Iproperties of any of these pipe runs, I can see that the value of model parameter "Part Number" now includes the name of the top level assembly and the line number, which is the name I assigned to the pipe run when I created it (see Fig 1 attached). Then in IDW I created a user defined symbol which contains text that I have directed to extract value of "part number" from the model properties, and fill in my symbol with that value (see Fig 2). The problem is, when I tag the pipe run with my custom symbol, the value in the symbol remains blank, instead of giving me the value of "part number". WHAT am I missing??
When using Inventor with Vault, we have a problem when categorizing custom content center parts in Vault. In short, custom content center parts are incorrectly categorized as "Content Center" and automatically released - as there is no property that we can use to identify these files.
I need iLogic code to trigger when custom content center files are created/saved, wich adds the following custom iproperty "IsCustomContentCenter=True".
I have been trying to find a method to extract custom properties from the custom property bag.
I have been able to extract the property value, using the "GetProperty" and the associated "GetValue" method, this method works when I know exactly what property name I am looking for. What do you do when you don't know the property name?
here is my code snippet..
dim myProps as acsmcustompropertybag = mysheet.getcustompropertybag dim myProp as iacsmcustompropertyvalue = myprops.getproperty("SOMENAME") dim myPV as string = myProp.GetValue
what I want to do is:
dim myProps as acsmcustompropertybag = mysheet.getcustompropertybag dim myPN as string = ??????????.tostring dim myProp as iacsmcustompropertyvalue = myprops.getproperty(myPN) dim myPV as string = myProp.GetValue
I am programmatically creating several property defintions inside of a property set definition. I would like to be able to set the display order of the property definitions but the property is read only. How to be able to accomplish this using the API?
I am working on extracting information from DWG with extended Property Set Definitions. I have added Location Property on my Door objects, and would like to retrieve it in my application.
Definition as shown in AutoCAD > Manage > Style Manager > Property Set Definitions
DoorObjects Property Set Name: AtSpaceID Description: Space - SpaceObjects - SpaceID Type: Location (becomes Automatic inside .NET API code) Source: Space - SpaceObjects - SpaceID Space Objects Property Set Name: SpaceID Description: SpaceID Type: Integer
I have tried the .NET API. see Code below. I am stuck at Property Definition Location. Not too sure where I can retrieve the value for my At Space ID at my Door Objects.
I tried the following code below and it throws error such as eInvalid Input or eNot Applicable.
Part of my code
Door doorEntity = trans.GetObject(doorObjID, OpenMode.ForRead) as Door;ObjectIdCollection idsPropSet = PropertyDataServices.GetPropertySets(doorEntity);foreach (ObjectId idPropSet in idsPropSet){ PropertySet propSet = trans.GetObject(idPropSet, OpenMode.ForRead) as PropertySet; PropertySetDefinition propSetDef = [Code]........
A way to update a property set definition programmatically?
Or via a tool palette tool.... I see there is with schedules for instance a right-click option to import a schedule style to update it... but I can't find a way to do this with property set definitions.
This would be in AutoCAD Arch (or MEP) 2012 or 2013.
I need to create skech symbols to illustrate mounting schemes, so without scale. I need to put dimensions in the symbol, which are only annotation, not parametric. This dimension must be visible once the symbol inserted on the sheet.
When I create the dimension in the sketch, it is always a paramertric dimension, which drve the drawing and is not visible in the inserted symbol.. How can I do to have only an annotation ? (I precise the option "sketch only" does not function on dimensions)
I would like to set the custom property format for all user paramters from an iLogic code. This is what I've come up with. It runs, but it does not seem to alter the custom property format. What am I doing wrong here?
I having problems trying to resolve a formula in the property definitions. I have a field that has USAGENO 060, 050 that the user inputs. But I would like to auto populate another field ROOMNAME with its corresponding text, to reduce input and avoid user error. The number always equals a room name as shown below.
060=Office 050=Lobby
I tried on the ROOMNAME field this but its not working. My field is set to formula.
I am trying to create a sketch symbol with info about the first view on a sheet. It seems to work fine with any of the properties built in, but I am trying to include the scale. There are lots of posts about putting scale in a title block, but I can't seem to get the same code to work for a sketch symbol.
Is it possible to modify a sketch symbol that has existing prompted text while keeping the existing prompted text? For example, I have a sketch symbol that is placed on every detail on the drawing. We could have 8 details on a drawing.
This sketch symbol uses prompted text to fill in the relevant information for each detail. Is there a way to change the sketch symbol globally and then copy the sketch symbol in to each drawing without losing the prompted text? Currently I have to modify the sketch symbol within each drawing. To keep the prompted text.
I want Inventor to add sketch symbols automaticly on cordinates according to a Custom Text Paramater
for example I have created Custom Multi Value Text User parameter Approved & Not Approved or Plate Work Notes & SteelWork Notes wich each represent diffrent sketch symbols that needs to be placed out base on the value selected. Each sheet consist of diffrent sketch symbols
I am trying to get Sketched Symbols with leaders to align.
I have a sketched symbol defined that has connection points defined at the outer quadrants. If the symbol doesn't have a leader they snap together at the connection points without any problems.
If the symbols have a leader they either won't snap, or jump to a random location depending on what grip you select to move.
The following video image shows the problems with the symbols with leaders.
insert a sketch symbol to a specific coordinate on a dwg border (top middle of dwg)
Workflow needed is as follows
Copy Sketched symbol folder from Standard.dwg from (C:UsersPublicDocumentsAutodeskInventor 2012Templates.Paste into open dwg document and yes to all to overide symbolsPlace a named sketched symbol from drawing resources folder ie (PRELIMINARY) to top center of all sheets within documentreturn to first sheet when complete My new dwg has symbols in correct place so any new dwgs this is ok but we need to add it to hundreds of dwgs when opened or revised,so i want to tie this to external rule and trigger on save event.
ACA2011My dimensions seem to be fickle with regard to snaping. I've got my OSNAPs on, and I can't snap to a structural beam above, nor can I snap to a window sill. I can dim to the mid point of the window sill by using .x & .y filters, and can only snap to the axis line on a beam. Is there a toggle somewhere?
I have a .iam and .idw that i copied/designed from vault. The .idw has a sketched symbol that has a text box with the mass property. When update mass is applied the mass property in the text box does not. I ran into this once before and got it to work by re-inserting the symbol into the .idw but I can't get it to work. The orginal that was copied from works fine.
The company I work for produce drawings for various types of fabrication.
Using Inventor I have a drawing border in which tolerance values change depending on the type of fabrication to be produced. The type of fabrication (0,1,2,or 3) is designated by a custom property entered during part/fab model creation.
This property may change depending on various production factors. The issue I have is how do I get the border to recognize this potential change in fab type and populate the tolerance fields with the necessary information?
My company has a custom property named 'Released date, Type Date.
This date is still empty
I am working on a rule that adds all the custom properties required for the company title block.
This rule can be useful whenever you get a model from a supplier.
I can add a custom property date using the following
Dim oDoc As Document = ThisApplication.ActiveDocument Dim customPropertySet As PropertySet = oDoc.PropertySets.Item("Inventor User Defined Properties") Try iProperties.Value("Custom", "Released Date") = iProperties.Value("Custom", "Released Date") Catch
[Code]...
This code works but sets the released date to Now.
But the release date needs to remain blank when adding.
I tried to make the value Null but I get the error:
"Value of type 'System.DBNull' cannot be converted to 'Date'."
Is there a way to keep a custom property date blank?
I am developing an simulation application, leveraging on using Space objects and applied additional Property Set Definitions for Space objects where I introduced a new Property "Value".
I applied a display theme to my DWG, and based on the value of the Property, different colors will be displayed according to the display theme.
For a single DWG file containing the building, I am able to simulate the color changes by updating the “Value” Property in the Spaces using .NET APIs functions such as PropertySet.SetAt, and committing the transaction.
However, one building can consist of many different levels, and I have split up the modeling of the building into its separate levels. For example, a 3 storey building, I will have 3 DWG files for each individual levels.
A main empty DWG was then used to XREF the 3 levels, to combine the different levels into a whole building. I would like to simulate such colour change through the main DWG which references my individual level DWGs.
what .NET API I can use to access the XREF DWGs in my main DWG, so that I can update the "Value" property in all my Space objects?
I would like to add a automatic property set definition for door "swingdirection" in my door schedule and replace the “left” with LH, “right” with RH and if neither (N/A) with DBL (for double leaf doors).
I thought I remembered being able to view source code in 2004 ADA for how to change and replace but I’m lost in 2013.
I'm trying to see if I can write a rule that will link a custom property at the part level in a template and have it update when I copy the part and drawing to a new design. Below is the formula I'm using and it works in the original files but when I use Design Assistant to create a copy for a new design, this formula will not update.