Is it possible to change the Constant property of an AttributeReference ? (the property IsConstant is readonly)
How to set the Constant property AttributeReference?
1.6k views Asked by Florian At
2
There are 2 answers
0
Maxence
On
You need to change the AttributeDefinition in the block table record (property Constant), not on the AttributeReference. This property is shared with all the AttributeReference.
From the docs:
AutoCAD itself never creates a constant AttributeReference object. AutoCAD creates the AttributeReference objects for each BlockReference based on the AttributeDefinition objects within the referenced BlockTableRecord. If a constant AttributeDefinition is encountered, then AutoCAD uses the AttributeDefinition itself instead of creating a matching AttributeReference.
Related Questions in C#
- Passing arguments to main in C using Eclipse
- kernel module does not print packet info
- error C2016 (C requires that a struct or union has at least one member) and structs typedefs
- Drawing with ncurses, sockets and fork
- How to catch delay-import dll errors (missing dll or symbol) in MinGW(-w64)?
- Configured TTL for A record(s) backing CNAME records
- Allocating memory for pointers inside structures in functions
- Finding articulation point of undirected graph by DFS
- C first fgets() is being skipped while the second runs
- C std library don't appear to be linked in object file
- gcc static library compilation
- How to do a case-insensitive string comparison?
- C programming: Create and write 2D array of files as function
- How to read a file then store to array and then print?
- Function timeouts in C and thread
Related Questions in AUTOCAD
- Entities wrong when importing multiple DXF files
- How to Embedded Autodesk Viewer on winform vb.net
- Set default value for string prompt
- C# Code to Control AutoCAD's Camera
- Trying to read data from a DWG using Autodesk.AutoCAD.DatabaseService What DLL do I need to reference to?
- Using Python to count the number of layers in a AutoCAD file
- When I change an attributeReference textString property the position of my BlockReference changes?
- AutoCAD drawing (DWG) to map tiles
- DXF file does not open in AutoCAD
- Generate DXF drawing in Java
- vb.net autocad get blockreference winform
- Revit/AutoCAD Plugin connection to Webservice/Server possible?
- CAD secondary development
- How to get and compare 2 similar position points in different DXF file?
- Return first six characters of a binary file
Related Questions in AUTOCAD-PLUGIN
- Entities wrong when importing multiple DXF files
- A C# Method to Import Block Definitions into AutoCAD
- How to Embedded Autodesk Viewer on winform vb.net
- Set default value for string prompt
- Programmatically get the location of a block in AutoCAD with its ObjectId
- C# Code to Control AutoCAD's Camera
- Using Python to count the number of layers in a AutoCAD file
- Revit/AutoCAD Plugin connection to Webservice/Server possible?
- How to view CAD Drawing file in WebMap application
- Inserting a preexisting AutoCAD drawing into a current drawing
- How do we set the AutoCAD layer viewport override values
- DocumentCollection.Open() function not working AutoCAD API
- How to represent IFC models on Android?
- getting input on netloading assembly...?
- Working with dynamic blocks in C # (for AutoCad)
Related Questions in OBJECTARX
- getting input on netloading assembly...?
- Working with dynamic blocks in C # (for AutoCad)
- Where is the documentation for Autodesk.AutoCAD.Interop?
- How To use Libcurl With Objectarx 2016
- How to Get all opened AutoCad documents(drawings) using .NET
- How can I export a custom markup back into AutoCAD
- ObjectARX SDK for c#
- Adding a Vertex to a closed Polyline in AutoCAD
- Reference, Include, Library, Source paths based on active solution configuration
- AutoCAD Plugin - Developer Symbols Registration
- How to override AcDbEntity::transformBy to get custom entity transformation while moving or scaling?
- Working through AutoCAD 2021 Labs, not sure what lab #5 is asking me to do
- Invoke ObjectARX acedDisableDefaultARXExceptionHandler from c#
- Hide block selection dialog on bedit command
- AutoCAD Plugin Development by Example
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
I don't know about objectarx, but in .Net (since you stated c#), try this:
Edit: I just realized you also said AttributeReference and not AttributeDefinition. Without verifying for sure, I think the reference cannot be modified directly since the value is constant. Because of this, you'll have to update the block's definition in the BlockTableRecord, same basic process once you've got it.
Here's the code for updating: