Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Overwrite symbol only if not modified locally?

4 REPLIES 4
Reply
Message 1 of 5
CadUser46
381 Views, 4 Replies

Overwrite symbol only if not modified locally?

Im trying to find a way of identifying if a symbol either has been modified locally or is different from the definition in our symbol template.  I cant see anything obvious in the api of the sketchedsymboldefinitions, or sheet.sketchedsymbols that would either show a flag or allow me to compare the two.

 

Has anyone come across this problem and found a solution?


Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

---------------------------------------------------------------------------------------------------------------------------
Inventor 2010 Certified Professional
Currently using 2023 Pro
4 REPLIES 4
Message 2 of 5
xiaodong_liang
in reply to: CadUser46

Hi,

 

The only 'difference' I could think of is the prompt text or property text. In definition, they are just defined. When the user insters a symbol, the text will be set. So, I am not clear on the 'difference' you refer to. Could you elaborate it?

Message 3 of 5
CadUser46
in reply to: CadUser46

Basically i have a library idw and the actual drawings. I want to check if any symbol has been modified by the user and/or is different to the library. Local modification is allowed in certain parts of the workflow so i dont want to overwrite during a macro. The particular symbol that prompted the question is not a prompted entry so i may need to remake them as such and have my macro fill with the correct text at an earlier point in the workflow.

Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

---------------------------------------------------------------------------------------------------------------------------
Inventor 2010 Certified Professional
Currently using 2023 Pro
Message 4 of 5
CadUser46
in reply to: CadUser46

In case i was not clear i will try again. I want to know if a user has modified a symbol in their drawing so that it is now different to the one they copied and inserted from our library.idw.
Im trying to write a macro that only overwrites if it matches the library definition (because i can update the library definitions) but ignores it if a user has modified it locally, presumably because its a non-standard scenario. I dont want it to be reset in the second case.

Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

---------------------------------------------------------------------------------------------------------------------------
Inventor 2010 Certified Professional
Currently using 2023 Pro
Message 5 of 5
xiaodong_liang
in reply to: CadUser46

Hi,

 

assume there are geometries, static text, prompted text and property text in a symbol definition.

 

11.jpg

 

after the symbol definition is inserted as a symbol, it would be:

 

22.jpg

 

for the result symbol, the user can only change the prompted text result string. He cannot change geometries and static text. as to property text, it depends on the corresponding property. 

 

So, if you want to compare the result symbol. You could only compare the prompted test result string, by SketchedSymbol.GetResultText.

 

If you want to compare the symbol definition, you will need to iterate each sketch element and check if they are different.

 

 

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report