Search found 9028 matches

by andrew
Tue Aug 09, 2016 4:56 pm
Forum: QCAD 'How Do I' Questions
Topic: Enabling NTFS file support
Replies: 14
Views: 12149

Re: Enabling NTFS file support

Yes, you could definitely use a plugin to run this code.

I cannot tell if this will take care of your situation as I've never felt the need to enable NTFS permission checking so far, so this might or might not make a difference.
by andrew
Tue Aug 09, 2016 4:40 pm
Forum: QCAD 'How Do I' Questions
Topic: Enabling NTFS file support
Replies: 14
Views: 12149

Re: Enabling NTFS file support

qt_ntfs_permission_lookup is not mapped to the ECMAScript interface.
by andrew
Mon Aug 08, 2016 4:20 pm
Forum: QCAD Programming, Script Programming and Contributing
Topic: Reacting to document modifications
Replies: 22
Views: 22548

Re: Reacting to document modifications

I'd strongly recommend to NEVER use these integer IDs in your code. Those IDs are generated at run time and can change in every future release and theoretically even every time the application is run. To look up a particular modification or check if a change matches a change you are interested in, a...
by andrew
Mon Aug 08, 2016 2:24 pm
Forum: QCAD 'How Do I' Questions
Topic: Running a script on all open drawings
Replies: 2
Views: 3099

Re: Running a script on all open drawings

Please make sure that your action runs in the global script context, not in the script context of a single document. When setting up your action (i.e. in TestAction.init or TestActionInit.js):
action.setRequiresDocument(false);
by andrew
Mon Aug 08, 2016 1:00 pm
Forum: QCAD Programming, Script Programming and Contributing
Topic: Reacting to document modifications
Replies: 22
Views: 22548

Re: Reacting to document modifications

Note sure I understand. Please elaborate. getAffectedObjects() does return a list of IDs of entities that were modified.
by andrew
Mon Aug 08, 2016 10:32 am
Forum: QCAD Programming, Script Programming and Contributing
Topic: Reacting to document modifications
Replies: 22
Views: 22548

Re: Reacting to document modifications

Then I tried to use the vl_change_list as an array. vl_objIds = vl_changes.getAffectedObjects(); vl_change_list = vl_changes.getPropertyChanges(vl_objIds ); test1 = vl_change_list[0].getNewValue; test2 = vl_change_list[0].getOldValue; test3 = vl_change_list[0].getPropertyTypeId; all 3 test variable...
by andrew
Mon Aug 08, 2016 10:12 am
Forum: QCAD Troubleshooting and Problems
Topic: Part library items with custom properties
Replies: 3
Views: 5557

Re: Part library items with custom properties

You can attach custom properties or custom variables to: - documents (data that refers to one specific document, RDocument::setVariable ) - entities (individual data for each individual entity) - blocks (data that refers to blocks or is the same for all block references of the same block) - layers (...
by andrew
Fri Aug 05, 2016 6:02 pm
Forum: QCAD Programming, Script Programming and Contributing
Topic: Reacting to document modifications
Replies: 22
Views: 22548

Re: Reacting to document modifications

getPropertyChanges returns an array. You can iterate through that array using a for loop. As you can see in the API doc, each item in the array is of type RPropertyChange . Please click the above link to see how you can extract the ID of the property that was changed, the new value, the old value, e...
by andrew
Thu Aug 04, 2016 7:05 pm
Forum: QCAD Troubleshooting and Problems
Topic: Part library items with custom properties
Replies: 3
Views: 5557

Re: Part library items with custom properties

This is expected behavior. The custom properties are added to a block reference (aka "block instance" or "block insert") in the part library. When you insert the part library item, the block reference is copied into your drawing, copying the custom properties with it. The block definition is also co...
by andrew
Thu Aug 04, 2016 6:56 pm
Forum: QCAD 'Script Add-On & Plug-in challenge' - Work in Progress
Topic: QCAD Project
Replies: 10
Views: 26610

Re: QCAD Project

Connor: I've split your new question into a new topic at:
http://www.qcad.org/rsforum/viewtopic.php?f=33&t=4340
by andrew
Thu Aug 04, 2016 4:20 pm
Forum: QCAD Programming, Script Programming and Contributing
Topic: [Solved]Get entity based on ID
Replies: 4
Views: 7744

Re: Get entity based on ID

RTransaction::getAffectedObjects returns a list of object IDs as integers (RObject::Id) not strings.

If you have an entity ID, you can simply query the entity from the document using:

Code: Select all

entity = doc.queryEntity(entityId);
by andrew
Thu Aug 04, 2016 3:49 pm
Forum: QCAD Programming, Script Programming and Contributing
Topic: [Solved]Get entity based on ID
Replies: 4
Views: 7744

Re: Get entity based on ID

What does your Entity_to_text do?
Are you trying to look up an entity that matches a certain geometry (e.g. a line from 50,20 to 70,80) or an entity that matches a certain ID?
by andrew
Thu Aug 04, 2016 3:46 pm
Forum: QCAD Programming, Script Programming and Contributing
Topic: Reacting to document modifications
Replies: 22
Views: 22548

Re: Reacting to document modifications

Ghost_of_Magellan: I've split your other question to this new topic:
http://www.qcad.org/rsforum/viewtopic.php?f=30&t=4339
by andrew
Thu Aug 04, 2016 3:33 pm
Forum: QCAD Programming, Script Programming and Contributing
Topic: Reacting to document modifications
Replies: 22
Views: 22548

Re: Reacting to document modifications

RTransactionListenerAdapter would be the correct listener to use to monitor changes. REntityExportListenerAdapter listens to entities being exported (e.g. to a graphics scene or to a file).

Go to advanced search