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#
- How to call a C language function from x86 assembly code?
- What does: "char *argv[]" mean?
- User input sanitization program, which takes a specific amount of arguments and passes the execution to a bash script
- How to crop a BMP image in half using C
- How can I get the difference in minutes between two dates and hours?
- Why will this code compile although it defines two variables with the same name?
- Compiling eBPF program in Docker fails due to missing '__u64' type
- Why can't I use the file pointer after the first read attempt fails?
- #include Header files in C with definition too
- OpenCV2 on CLion
- What is causing the store latency in this program?
- How to refer to the filepath of test data in test sourcecode?
- 9 Digit Addresses in Hexadecimal System in MacOS
- My server TCP doesn't receive messages from the client in C
- Printing the characters obtained from the array s using printf?
Related Questions in AUTOCAD
- How to use custom class created by ObjectARX
- How to copy and paste an autocad table using python
- Loading ARX module fails without information
- Circular profiles on the hallow sphere in Autodesk Inventor
- GDAL ogr2ogr alternative that uses multiprocessing
- How do CAD applications handle out-of-range characters in SHX fonts?
- To Set a System Variable Value With JavaScript API in AutoCAD
- I am trying to write a sanskrit mantra on autocad. When I preview the text, it is correct but as I plot the file to pdf, the 'maatra's' change
- LISP to Batchplot (Publish) Multiple .dwg Models into One PDF
- How to find a contour for a specified point using Autocad COM API?
- Issue connecting python to Autocad
- Autocad using pyautocad / comtypes to copy objects from one drawing to another
- Max input file size of Design Automation for AutoCAD?
- How do you get the coordinates of the boundaries of each closed area?
- How to find closed objects among an array of lines?
Related Questions in AUTOCAD-PLUGIN
- Clone layout from another drawing then viewports are lost after save in AutoCAD .NET
- Discrepancy in AutoCAD Architecture:Surface( Interior Wall ) Coordinates received from Space Data Is Not Matching Original Wall Coordinates
- Editing arc Normal Z within LW polyline in AutoCAD without exploding polyline
- AutoCAD .net : Check is font file missing
- Does autolisp have a 'wait for x seconds'?
- Deleting AutoCAD Layouts Causes Export to PDF to Fail
- Autocad .net API combine blocks into one
- AutoCAD .net Customization: Is there an entget equivalent for .net?
- Running AutoCAD LT 2024 Lisp Program using Python subprocess module
- accoreconsole.exe freezes after series of transactions
- Cannot import landxml file into dwg using Civil 3D Design Automation
- Change an attribute in Plant 3D with data from a Datatable
- Add Mtext with properties assigned
- Read CSV and use values to insert and populate a block
- Can't use C# standard Dictionary as container for AutoCAD API TypedValue and ExtendedData ResultBuffer
Related Questions in OBJECTARX
- How to use custom class created by ObjectARX
- Loading ARX module fails without information
- How To use Libcurl With Objectarx 2016
- How to create AutoCad object from this handle using ObjectARX
- How to regen PCG point cloud entity in AutoCAD2021
- How to set the multiline property for an attribute inside an AutoCAD block definition using C# API?
- AutoCAD ObjectARX c++ What is the syntax to convert a AcString to a std::string value?
- Saving AcDbSubDmesh into drawing database failed
- Expanding AutoCAD menu programmatically
- SQLite C++ statement giving weird runtime error
- Creating an arrow with adjustable line thickness ObjectARX C#
- How to convert an ellipse to a polyline in Objectarx C#
- Working through AutoCAD 2021 Labs, not sure what lab #5 is asking me to do
- Why do viewports created using commands in ObjectARX not save to the database?
- How can I export a custom markup back into AutoCAD
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: